9

We have an older app from 2006 we'd like to uninstall at the command line using group policy, but I can't get a silent uninstall to work.

This works. Of course I need to click Next to uninstall:

 "C:\App\Setup.exe" /uninst

But this does not. I see an hourglass for a couple seconds but the app is not uninstalled.

 "C:\App\Setup.exe" /uninst /s

I also unsuccessfully tried some VBScripts. They find the app listed but the uninstall fails. I'm not too familiar with how this process is supposed to work.

Dave
  • 4,949
  • 6
  • 50
  • 73

7 Answers7

15

You need to create first an ISS response file to silently remove your application,

  1. Create response file : C:\App\Setup.exe /r /f1c:\app\uninstall1.iss you will be asked to uninstall, .... and perhaps reply the others windows. Then your application would be uninstalled and you get a new response file c:\app\uninstall1.iss

  2. Next, if you want to remove silently this application on another computer : launch : C:\App\Setup.exe" /s /f1c:\app\uninstall1.iss

For more information see:

http://www.itninja.com/blog/view/installshield-setup-silent-installation-switches

Best Regards, Stéphane

Mariusz Jamro
  • 30,615
  • 24
  • 120
  • 162
stephane
  • 166
  • 1
  • 2
  • I upvoted your answer, but unfortunately that method is not working for me. Your first statement worked, with the dialog, just not the second one in silent mode. Is it possible the installer just does not have this capability? – Dave Jul 11 '12 at 15:37
10

Try this, with the original setup.exe version that was used to install

"C:\App\Setup.exe" /x /s /v/qn
scrat789
  • 2,961
  • 3
  • 30
  • 26
9

I've been struggling with the silent uninstaller for a while, and finally came to a solution that works for me in most cases, both for InstallShield v6 and v7.

1. First (as it was mentioned above), you have to generate an InstallShield Response file (e.g. uninstall.iss). In order to do that you have to launch your setup.exe with parameters:

> setup.exe -x -r -f1"C:\Your\Installer\Location\uninstall.iss"

This will go through the normal uninstall wizard and generate a Response file for you: uninstall.iss

2. Then, before trying your silent uninstaller, I guess, you should re-install the software.

3. And finally, run your silent uninstaller playing back the recently generated Response file:

> setup.exe -x -s -l0x9 -ARP -f1"C:\Your\Installer\Location\uninstall.iss"

That's it.

Now, a few important notes:

Note 1: I'm working with a 3-rd party installation package that I didn't build myself.

Note 2: I use dashes (-) instead of slashes (/) to define parameters. For some reason it doesn't work with slashes for me. Weird but true.

Note 3: The -ARP and -l switches are required for some installation packages to manage the software removal from the Add/Remove Programs list and to preset the default input language accordingly.

Successful silent uninstallation is all about the correct parameters! So keep exploring, the correct parameters vary depending on a specific package and installer version.

I hope my input was helpful.

Alex X.
  • 453
  • 5
  • 11
0

Try Format: Setup.exe M{Your Product GUID} /s /f1[Full path]\*.iss for creating the ISS file for uninstallation. From Stephanie's sample, I think it's missing the GUID.

There's a good link at the developer's site @ Creating the Response File.

Try it out n tell us,

Tommy Kwee

The Original Android
  • 6,147
  • 3
  • 26
  • 31
0

I struggled with this for a long time so posting it here in case anybody else stumbles upon it.

If you happen to have an installer which uses the legacy Package-For-The-Web format then you need to use the parameter -a to pass additional parameters to the extracted setup file.

Record (un)installation files (click through the installer manually):

.\DWG2PDF2019.exe -a /r /f1"c:\app\dwg2019_install.iss"
.\DWG2PDF2019.exe -a /r /f1"c:\app\dwg2019_uninstall.iss"

Silently (un)install:

.\DWG2PDF2019.exe -s -a /s /f1"c:\app\dwg2019_install.iss"
.\DWG2PDF2019.exe -s -a /s /f1"c:\app\dwg2019_uninstall.iss"

Source: https://help.hcltechsw.com/caa/3.0/topics/appacc_silent_install_t.html

jansohn
  • 2,246
  • 2
  • 28
  • 40
0

There's another way to uninstall an app by searching for it in the Registry, and using the UninstallString (this sample code uses powershell on windows 10):

# Get all installed apps from Registry
$Apps = @()
$Apps += Get-ItemProperty "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*" # 32 Bit
$Apps += Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*"             # 64 Bit

# Uninstall My App
$my_app = $Apps | Where-Object{$_.DisplayName -eq "The Name Of My App"}
$uninstall_string = " /C " + $my_app.UninstallString+' /S'
Start-Process -FilePath "cmd.exe" -ArgumentList $uninstall_string -Wait

if you don't know the exact full display name of your app, you can print the "Apps" array to a file, and search there:

$Apps | Out-File C:\filename.txt
Hazem Elraffiee
  • 453
  • 7
  • 16
0

I was working on a silent uninstall of an InstallShield installer and was running into similar issues. What was posted here did not work or help. After lots and lots of trial and error I did find that for some reason when I used the -uninst option for both the creating the response file and running the silent uninstall I had success. In case anyone runs into a similiar issue and stumbles upon this thread I wanted to share. I am not sure why but adding -uninst did change the contents of the response file.

In my example creating response file: "C:\Program Files (x86)\InstallShield Installation Information\{0D20ACF2-CEE1-4523-BFCF-389BC4CC81FB}\setup.exe" -runfromtemp -l0x0409 -removeonly -uninst -r -f1"c:\uninstall.iss"

Then I could finally get the silent uninstall to function as expected: "C:\Program Files (x86)\InstallShield Installation Information\{0D20ACF2-CEE1-4523-BFCF-389BC4CC81FB}\setup.exe" -runfromtemp -l0x0409 -removeonly -uninst -s -f1"c:\uninstall.iss"