Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HowTo: Parse the UninstallString reg entry

In HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ is the list of installed programs in my machine (at least most of them). There, there's a String Value called UninstallString which has what you need to run in order to uninstall the program.
The thing is not every installer writes the same kind of info, yet Windows knows how to parse that string to run the uninstaller.
My questions are: does anybody know how to parse that string?, meaning what are the possible values it might get? and if not, where can I find that kind of info? I googled around with no luck, I guess I'm not looking for the right terms.

like image 960
sebagomez Avatar asked Nov 15 '22 17:11

sebagomez


1 Answers

Have a look at this link from MSDN explaining install/unistall procedures, specifically item #6 "Support Add/Remove Programs Properly".

As an excerpt from the table there:

   Key Name   |   Key Type    |                  Description
UninstallPath | REG_EXPAND_SZ | Full path to the application's uninstall program

Despite the fact it says 'full path', alot of applications seem to shorten it if the program is in $PATH, especially with things like msiexec.exe.

like image 106
Matthew Scharley Avatar answered Dec 09 '22 11:12

Matthew Scharley