EXE silent installation

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 powershell issue

Even I try with winrar.exe and zip.exe files giving the same result. Is this right way to do?

7

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>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

1
Start-Process -Wait -FilePath "\full\path\setup.exe" -ArgumentList '/S','/v','/qn' -passthru

The 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.

  1. Go to Control Panel -> System and Security -> Security and Maintenance
  2. Click Change User Account Control settings.
  3. Set the slider to "Never Notify".

This may be risky - but it works.

1

add the -NoNewWindow to stop the popup

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like