We help IT Professionals succeed at work.

How to trigger a silent software uninstallation from the command line

Trying to un-install a program from a package and the vendor has not really setup any command - line parameters for this.

We did find out that the un-instlalatin does work from Windows 10 - Programs - Uninstall program.

When one executes the uninstlal manually, a UAC prompt comes up and it states that it will execute:  
File Uninstall command line "C:\Program Files (x86)\FOLDER_HERE\Uninstall.exe" "C:\Program Files (x86)\FOLDER_HERE\Uninstall\install.log"

How can we try to execute this from a command prompt?  I have already turned off Universal Access Control (UAC) for testing purposes.

I guess the question is how to:

1).  Trigger the uninstall.exe file located in: C:\Program Files (x86)\FOLDER_HERE\ - folder

2).  Use the \install.log file located in another folder "C:\Program Files (x86)\FOLDER_HERE\Uninstall\install.log"
Watch Question

You can (1) create startup, shutdown , logon, or logoff script for the group policy, with this command inside; or (2) you can use psexec and run this command remotely on one or more computers
Distinguished Expert 2019


You can (1) create startup, shutdown , logon, or logoff script for the group policy, with this command inside;

No, since that command is not silent.

@pkafkas: did you try and add the usual suspects: 

/s /silent /q /quiet /verysilent

behind uninstall.exe? Often, these work. Use one of them, not any of them in each test, for example

"C:\Program Files (x86)\FOLDER_HERE\Uninstall.exe" /quiet

PkafkasNetwork Engineer


We do not use Active Directory and Group Policy here.  We use MicroFocus

I think there might be a batch file that can input a log file name but that .log file must be in the same folder.  Plus this software wil not be instlaled on every pc.
PkafkasNetwork Engineer


This seems to work, "c:\program files (x86)\FOLDER_Here\Uninstall.exe" "c:\program files (x86)\FOLDER_HERE\Uninstall\install.log" -s -var:reboot=0

-s means silent and 1= to reboot 0=not to reboot.

it appears that if you are in an elevated command prompt and put a file within quotes the DOS program will trigger that specifci quoted file.  Then the same for anything else next.  It appears that those 2 files are what was called to trigger the un-install in ADD/Remove Programs.

the other varioable -s  stands for you guessed it ''silent" un-install.  Then the -var: must create or call a windows command like 'reboot' = 0 to not reboot.

Can anyone else provide an explanation how the above command worked?
Distinguished Expert 2019
Each application, removal options can differ

Another option is to use msiexec.exe /X {guid of install package} /q /silent /quiet

You have to identify the installed software.
PkafkasNetwork Engineer


If I attempted to manually remove the program from my computer, I say the UAC come up and it stated:

GUID …., just like Arnold stated.  So, if I understand correctly, another option is to:

1).  Open command prompt as administrator.
2).  Type: msiexec.exe /X {guid of install package that I see from the UAC - Details} /q /silent /quiet

If that is correct, that is pretty cool as well.