Execute-Process with .ini file

Hello there,

Need help for setup.exe /silent /norestart /i:“path of ACinsOut.ini file” working in cmd.exe but below command seems nor working as expected. Still being prompted to click Next.

Execute-Process -Path “$dirFiles\setup.exe” -Parameters “S /V “/qn /norestart” -f "$dirFiles\ACInsOut.ini”"

or this?

Execute-Process -Path “$dirFiles\setup.exe” -Parameters “/SILENT /NORESTART -f "$dirFiles\ACInsOut.ini”"

please help! many thanks,

Try this, hopefully the forum formats this correctly:

Execute-Process -Path "$dirFiles\setup.exe" -Parameters "S /V `"/qn /norestart`" -f `"$dirFiles\ACInsOut.ini`""

(use 3 backticks to open and close a code block!)

Make sure you don’t have any curly quotes in there that might have come from a doc or web page, and escape any double quotes inside double-quoted strings with a backtick.

1 Like

Hi @DanGough,

I got this prompt when running the script mentioned above. Do have any idea?

I think this is probably because the / in front of the S (1st Parameter) was missing (green arrow below) or maybe you had not used the escape character (`) which @DanGough gave in his example, (Similar to the other conversation we have had), I have marked them here with the red lines:

2 Likes

As well as /S, try removing the space after /V (every instance I’ve seen of it used has the quote immediately following it):

Execute-Process -Path "$dirFiles\setup.exe" -Parameters "/S /V`"/qn /norestart`" -f `"$dirFiles\ACInsOut.ini`""
3 Likes

Yeah thank you, and you are right i missed the /S and removing space /V as @DanGough suggested works!

@DanGough appreciate your help here! :innocent:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.