1
votes

I have a complex installer (Wix) that is in multiple parts. One part installs some camera drivers (32 OR 64 bit depending on what is called for) via an EXE file, NOT AN MSI FILE. Once my app is installed, using Wix, the camera drivers/executable appear in Programs and Features in my Control Panel. Before I can upgrade my app, I have to uninstall the camera drivers (and then install the latest version). There is no uninstall EXE/MSI in the camera's install directory. I can figure out how to check if the camera is installed (although I'm not there yet), but how do I uninstall the camera w/o manually going to control panel. How do I automate this process?

Note: I look thoroughly online for a solution, and while a lot of threads came close, nothing actually answered this question.

Note: after more searching, I ran across WMIC(http://www.tech-recipes.com/rx/2947/windows_uninstall_application_command_line/). Can I automate via WMIC? To make things even stranger, my camera doesn't show up in the WMIC list, it IS in Control Panel though.

Thanks in advance!

-Dan

1
All the uninstall items are in the registry, so it could be read from that.Petesh
The uninstall registry keys are documented here - msdn.microsoft.com/en-us/library/windows/desktop/… - which should give enough detail to work with?Petesh
@Petesh, thanks! With your help, I was able to find the uninstall EXE. Thing is, it gives me three options when I run it: modify, remove, repair. Do you know what command line params to pass it so that 'remove' is the only option?Dan G
Unfortunately if the UninstallString doesn't give the full path and arguments for a clean uninstallation; then you may just need to experiment running the uninstall command with /help to see if it has some options it will take to allow a silent uninstallation without the prompt.Petesh
@Petesh: /uninstall seemed to do the trick. Thanks again for all the help. Post your material as an answer and I'll give you credit.Dan G

1 Answers

0
votes

If the command appears in the Add/Remove programs applet, then the information is available in the Uninstall Registry keys. By enumerating the entries in this registry key, you should be able to determine the information necessary to perform an uninstall of the component in question. Typically the UninstallString gives the proper invocation syntax to uninstall the component without needing any user interaction.

Some applications have specific behaviours, and you can have both a ModifyPath and UninstallString option in the registry. The ModifyPath option would be for the check/reinstall/fix/add-remove items options, while the UninstallString should perform an uninstallation, hopefully without needing user interaction.

For the app in question, it takes the program name and the /uninstall parameter to get it uninstalled in this case without having to press any options.

Some uninstallers take the /q or /quiet option which performs the uninstallation without any user interaction - this is all down to the app in question.