Ramesh Bolla
Ramesh Bolla

Reputation: 412

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?

Upvotes: 12

Views: 234910

Answers (10)

explorer2020
explorer2020

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/

enter image description here

Upvotes: 0

zoktolk
zoktolk

Reputation: 1

$Arguments = @(
    "/S"
    "/V/qn"
    )

Start-Process -FilePath “application.exe” -ArgumentList $Arguments -Wait -NoNewWindow

Upvotes: 0

joshinator414
joshinator414

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

Ankur Mangal
Ankur Mangal

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

Yakir GIladi Edry
Yakir GIladi Edry

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

mohit
mohit

Reputation: 1968

Try this:

Start-Process -Wait -FilePath C:\setup.exe -Argument "/silent" -PassThru

Upvotes: 8

Shreyas Ezhava
Shreyas Ezhava

Reputation: 193

Have you tried the following command?

Start-Process -Wait -FilePath "C:\Setup.exe" -ArgumentList "/S" -PassThru

Upvotes: 17

Gary
Gary

Reputation: 1

add the -NoNewWindow to stop the popup

Upvotes: -2

Nissim Hadar
Nissim Hadar

Reputation: 11

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.

Upvotes: -2

VGSandz
VGSandz

Reputation: 144

Please try this:

$pathvargs = {C:\Temp\UpgradeClientInstaller\setup.exe /S /v/qn }
Invoke-Command -ScriptBlock $pathvargs

Upvotes: 7

Related Questions