0

I have UninstallString and I want to uninstall the program silently so that no user interaction involved. I have the UninstallString like the following :

  • C:\Program Files\Notepad++\uninstall.exe
  • C:\Program Files\7-Zip\Uninstall.exe
  • C:\xampp\uninstall.exe

    and so on ...

I have opened these as a process But I don't know how to uninstall it silently.

I have heart some approach like find the windows and then send the OK keyStrokes but I don't know how to do it.

if it is a windows installer then we can use something like...

 MsiExec.exe /I{GUID} /q 

But how to do for above UninstallString which have .exe as the path.

Any help/Approaches will be highly appreciated.

Thanks a lot.

JAY prakash
  • 3
  • 1
  • 4
  • There's no universal solution for your question. This process will depend on the uninstaller because different programs could use different installation and uninstallation mechanism. – Asesh Apr 02 '20 at 15:53

2 Answers2

1

Silent uninstall command varies on different installer.

For example,

If installer is built using Wix toolset, it supports commands like: /s, /S, /qn, /quiet . i.e,

UninstallString /quiet

For, NSIS based installer, /S .

For, Install4j based installer, -q .

For, Inno-setup based installer, /SILENT, /VERYSILENT .

etc.

You can find details about Silent install parameters from this site.

Moreover, there has a tool called WMIC. Some people also directing to use this. You can find it from this link. [Though it did not work for me]

MAQ678
  • 71
  • 1
  • 5
  • yeah, You are right. Now I have to figure out the Installer Type. Thank you so much. – JAY prakash Apr 03 '20 at 11:53
  • But **It shows GUI** when there is custom Page during uninstall time. Like Asking for the password during uninstall time. So can it be silent as well? – JAY prakash Apr 03 '20 at 11:56
  • Some installer does not provide Silent mode. May be that is the case. But, please check that there has options to pass parameters with the installer. May be you can pass password (If the installer supports) – MAQ678 Apr 04 '20 at 05:00
  • How can we find out the type of installer if we have only **uninstallString** or **Registry access**? Is there any way? – JAY prakash Apr 04 '20 at 07:52
  • As far as I know, if developer does not expose the extra parameters, you can not know about them. You should google or contact with the application developer if there has any available parameters. – MAQ678 Apr 04 '20 at 08:00
  • Actually I have to automate the uninstallation process, so somehow I have to find out the type. Thank you for your valuable advice. I will try to figure out. Thanks for all info. – JAY prakash Apr 04 '20 at 08:15
0

As MAQ678 already told there are plenty of different Installer Type. Sometimes (mostly not, because Publishers are lazy) you can find the silent uninstall switch in the registry under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall if the package has an QuietUninstallString entry.

Jean Fiedler
  • 141
  • 9