windows - Calling 2 variables -
my question in regards previous question.
i got solution previous question when pass value in variable not working. start-process
not able trigger batch file. assume doesn't recognize variable "$gros"
.
$version = read-host - prompt 'enter version copy' $gros="d:\homeware\gros\$version" start-process $gros\install.bat -wait -workingdirectory "$gros"
error:
start-process : parameter cannot found matches parameter name 'workingdirectory "$gros"'. @ d:\homeware\scripts\oms_deploy.ps1:66 char:64 + start-process $gros\install.bat -wait -workingdirectory "$gros" <<<< + categoryinfo : invalidargument: (:) [start-process], parameterbindingexception + fullyqualifiederrorid : namedparameternotfound,microsoft.powershell.commands.startprocesscommand
try
start-process $gros\install.bat -workingdirectory $gros -wait
Comments
Post a Comment