1
votes

I'm working to automate the install of some of our software and was able to do so using a batch file, but was having issues with getting the silent install working in PowerShell.

The batch file which is working properly to install the application is:

@echo off
start /wait Setup.exe -s -l=EN
echo %errorlevel%

I've tried the following code in PowerShell, but the GUI installer will appear when I attempt to run it.

cmd.exe /c "Start /wait c:\temp\application\setup.exe -s -l=EN"

I don't receive any error messages when running the PowerShell script, it just doesn't install the application silently.

1

1 Answers

0
votes

Try this:

&{ "c:\temp\application\setup.exe" -s -l=EN }

This should call an external Commandline command from Powershell.

The braces are not always strictly necessary either if you are just running the command and not doing anything with the output the following would likely work

& c:\temp\application\setup.exe -s -l=EN