Reputation: 412
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?
Upvotes: 12
Views: 234910
Reputation: 65
USSF (Universal Silent Switch Finder ) helped me find the correct switches for my executable. After that, the silent installation worked for me. I got to know about it from here: https://www.pdq.com/blog/install-silent-finding-silent-parameters/
Upvotes: 0
Reputation: 1
$Arguments = @(
"/S"
"/V/qn"
)
Start-Process -FilePath “application.exe” -ArgumentList $Arguments -Wait -NoNewWindow
Upvotes: 0
Reputation: 31
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>nul
This 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
Upvotes: 2
Reputation: 11
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'
Upvotes: 1
Reputation: 2821
Start-Process -Wait -FilePath "\full\path\setup.exe" -ArgumentList '/S','/v','/qn' -passthru
The quotes of the execute file are not necessarily.
Upvotes: 2
Reputation: 1968
Try this:
Start-Process -Wait -FilePath C:\setup.exe -Argument "/silent" -PassThru
Upvotes: 8
Reputation: 193
Have you tried the following command?
Start-Process -Wait -FilePath "C:\Setup.exe" -ArgumentList "/S" -PassThru
Upvotes: 17
Reputation: 11
Your problem seems to be Windows UAC and not the script itself.
This may be risky - but it works.
Upvotes: -2
Reputation: 144
Please try this:
$pathvargs = {C:\Temp\UpgradeClientInstaller\setup.exe /S /v/qn }
Invoke-Command -ScriptBlock $pathvargs
Upvotes: 7