We were asked today in a Support Ticket why the Uninstall Command for PuTTY that shows up in PDQ Inventory doesn't work.
The short answer is that there are no silent parameters specified in the command. PDQ Inventory is reporting the uninstall string that is pulled from the registry at one of the two following locations:
For 32 bit machines =
For 64 bit machines =
The long answer is that this is going to take some Google Fu to find the answer. After researching for a few minutes we found an article that mentions that PuTTY doesn't support a silent uninstall like we'd like, but with a few commands it was possible. So we venture to PDQ Deploy and build the following package:
These are all command steps and as you can see even though it looks pretty complicated, it's really not.
Step 1 - Kills PuTTY if it's running (self explanatory)
taskkill.exe /f /im putty.exe
Step 2 & 3 - Both essentially do the same thing which is deleting the Putty.exe application. One step is for 32 bit and one for 64 bit. I also made sure to change the conditions on each of these steps to only run under the appropriate architecture.
del /F "C:\Program Files\PuTTY\putty.exe"
del /F "C:\Program Files (x86)\PuTTY\putty.exe"
Step 4 & 5 - Runs the appropriate Uninstall command we found online that will only work if the program isn't running and the PuTTY.exe file isn't present. Again one step for 32 bit and one for 64 bit with the appropriate conditions.
"C:\Program Files\PuTTY\unins000.exe" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-
"C:\Program Files (x86)\PuTTY\unins000.exe" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-
Now that my package was built, it was time to test it out. I found an assortment of machines that were 32 and 64 bit as well as Windows 7 and 8.1 machines. I deployed my test package and within a minute PuTTY was uninstalled from every machine I chose.