I need to call a executeable within my powershell script and want to wait for its result. To this exe I need to give some parameters which are contained in my variables, but this does not work
$gs = $currentPath +"\gs\gs8.70\bin\gswin32c.exe";
$outPdf="$cachepath\foobar_$IID.pdf"
$PS_FILE = "$cachepath\$IID.pdf"
I try to call the gswin32c.exe like this
& $gs q -dSAFER -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=$outPdf $PS_FILE
But this results in the error
gswin32c.exe : GPL Ghostscript 8.70: Unrecoverable error, exit code 1
In F:\pdix-services\GWT-BPS\EventHandler\adobe-printing.ps1:21 Zeichen:1
+ & $gs q -dSAFER -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=$outPdf $PS_FIL ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (GPL Ghostscript...or, exit code 1:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
I think there can be an errror because I need to put the parameters in quotes, but what are the correct ones? My tests did not work.
thanks