I have following PowerShell script to install application without user intervention:
Start-Process -FilePath "C:\Temp\UpgradeClientInstaller\setup.exe" -ArgumentList "/S /v/qn"by giving /s in argument list, it should install silently without user intervention but a popup is showing
Even I try with winrar.exe and zip.exe files giving the same result. Is this right way to do?
8 Answers
Have you tried the following command?
Start-Process -Wait -FilePath "C:\Setup.exe" -ArgumentList "/S" -PassThru 1 Please try this:
$pathvargs = {C:\Temp\UpgradeClientInstaller\setup.exe /S /v/qn }
Invoke-Command -ScriptBlock $pathvargs 1 Try this:
Start-Process -Wait -FilePath C:\setup.exe -Argument "/silent" -PassThru I know the post is super old, but I feel like I could share some insight on the matter
I had to do something similar a few years ago. When you click "install" on the prompt, all it's doing is adding the cert to the TrustedPublisher store. That prompt can be avoided if you manually add it to the cert manager prior to running the installer.
I found that if you install the program on a test machine, you can export the Cert from certmgr.msc. Then you can install the cert using:
certutil -addstore "TrustedPublisher" <PathTo.cerFile> >nul 2>nulThis will install the cert to the TrustedPublisher store therefore eliminating the need for that message to appear.
I hope this helps Ramesh as well as anyone else who finds this in the future
1Start-Process -Wait -FilePath "\full\path\setup.exe" -ArgumentList '/S','/v','/qn' -passthruThe quotes of the execute file are not necessarily.
Use this command it will not ask for any click on next and install the software.
Start-Process -Wait -ArgumentList "/silent" -PassThru -FilePath 'C:\Users\filename.exe'
Your problem seems to be Windows UAC and not the script itself.
- Go to Control Panel -> System and Security -> Security and Maintenance
- Click Change User Account Control settings.
- Set the slider to "Never Notify".
This may be risky - but it works.
1add the -NoNewWindow to stop the popup
1