Link to home
Start Free TrialLog in
Avatar of jmlacoste
jmlacosteFlag for France

asked on

C# uninstall a program on Windows 7

Hello,
I would like to find a way to uninstall a software by looking up the registry and find the msi file to launch with the uninstall commandline switch.
Basically, I can't find an elegant way to look into the appropriate registry path to find this info.
I know the place in the registry is different on my Windows 7 64-bits that what I've found on the Internet so far.
Is there a way compatible with all the versions of Windows?
I would do the lookup based on the msi name.
Thanks for your help
Avatar of AndyAinscow
AndyAinscow
Flag of Switzerland image

If it is installed via an msi then it should appear in the list of programs available for de-installation from the control panel.
Are you saying it doesn't ?
Or do you want to do it programatically ?
Avatar of jmlacoste

ASKER

Hi AndyAinscow

Yes I would like to do it programmatically from looking up an MSI name in the registry.
The software is available in the de-installation screen in control panel.
I was just saying that the registry path that I've found on the Internet to check what software is installed is different on my version of windows: I can find my software in HKLM\Software\Wow6432Node but the various solutions online are talking about something more like this: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
Hence I'm looking for a way to programmatically uninstall a specific MSI on all Windows versions (XP, Vista, 2003...)

Thanks again ;)
ASKER CERTIFIED SOLUTION
Avatar of Mike_Mozhaev
Mike_Mozhaev

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I didn't have the chance to actully implement this solution but it looks like the right direction to look into.
Thanks