Yesterday I published instructions on how to do a silent install of Aptify and it prompted the question of how to silently uninstall it. This may be desirable when upgrading between major version releases so that you don’t have extra versions of Aptify on your users’ desktops. Luckily the same basic technique that was used for the silent install can be utilized for the silent uninstall. The examples and screen shot below are from the removal of the Aptify 4.5 client. Again, there will be slight differences depending on the particular installer you used so you have to go through the steps to generate your own uninstallation command and Installshield answer file.
- Locate the uninstall string for your version of Aptify. You will find it in a subkey of the uninstall key in Windows. You will know it when you see the DisplayName value match what you see in Add/Remove Programs in Windows. The location of the uninstall key is as follows.
- “HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall” (64-bit Windows)
- “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” (32-bit Windows)
Within the uninstall key you will find a number of values. Here is what the key looks like for Aptify 4.5.
- Copy the UninstallString command prompt. You can drop all the extra parameters from it and just append “/r”. The setup executable is the same one used for installing Aptify and accepts the same parameters. This time we are going to record the uninstallation of the product. Run through the uninstaller as you would by hand. Again, the setup.iss file will be deposited in the windows folder for you.
"C:\Program Files (x86)\InstallShield Installation Information\{4B58692D-0683-43C2-A777-C3522BB038C1}\setup.exe" /r - The generated iss file is your answer file for the uninstall. Feel free to rename it as you please; I renamed mine to “aptify45_uninstall.iss”. You can now launch the uninstaller from a batch file using the following command line which will run silently and not return until the removal is complete and create a log file in your temp folder for diagnostic purposes. The log file is optional and you can remove the entire “/f2″ parameter if you don’t want it.
start /wait "Aptify 4.5 Uninstall" "C:\Program Files (x86)\InstallShield Installation Information\{4B58692D-0683-43C2-A777-C3522BB038C1}\setup.exe" /s /sms /f1"c:\aptify45_uninstall.iss" /f2"%temp%\aptify45_uninstall.log"
Notes
- I did notice when I tested this procedure earlier that there were a couple windows that flashed on the screen during removal. If you run the uninstall under the user’s account that is logged in you may see those flashes. However, if you run it using a different account such as when remotely executing a command line then the user won’t see anything because the uninstaller will not have permission to draw to the user’s screen. You probably won’t care about the flashes even if you see them but this is relevant if you are bent on flying under the radar.
- Just because the application has been uninstalled does not mean all traces of it are gone. You may still need to delete the Aptify folder in Program Files and if anyone created custom shortcuts to Aptify they will probably linger as well. I’ll leave it to you to clean that up if you feel the need but it won’t hurt anything.
- You will need to reboot after performing the removal procedure to finalize the uninstall of the product. It is probably a bad idea to install a newer version of Aptify prior to the reboot because there could be a conflict with the removal procedure that causes the new version of Aptify to only be partially installed.







