Uninstall application programmatically

  • Thread starter Alhambra Eidos Desarrollo
  • Start date
A

Alhambra Eidos Desarrollo

Hi anyone,

I have installed a winforms application vs 2005. It appears in Control Panel
-> Add / Remove Programs.

I have another application .NET and I want uninstall the application
installed programatically using only the name of application that appears in
Control Panel -> Add /Remove Programas (the product name).

Is it possible ?? Any suggestion about it ? Anyone has any ideas ?

thanks in advance, greetings, regards
 
C

Ciaran O''Donnell

you can access the path to the uninstaller from the registry key that
add/remove programs uses. If you know the application global id then it will
be the name of a subkey of
HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall
If you dont know that then you will need to look at the DisplayName item in
each of the subkeys in turn to find the one you are looking for, then you can
read the UninstallString item which will be the command you would need to
run to unstall it. It will normally be MSIExec.exe followed by the
installation id, unless the program has a custom non windows installer
uninstall program.
 
D

Duggi

Hi anyone,

I have installed a winforms application vs 2005. It appears in Control Panel
-> Add / Remove Programs.

I have another application .NET and I want uninstall the application
installed programatically using only the name of application that appearsin
Control Panel -> Add /Remove Programas (the product name).

Is it possible ?? Any suggestion about it ? Anyone has any ideas ?

thanks in advance, greetings, regards
--http://www.alhambra-eidos.es/web2005/index...topic.php?p=843www.trabajobasura.com/solusoft

Get the uninstallation string from HKLM\Software\Microsoft\Windows
\CurrentVersion\Uninstall\SOFTWARENAME\UninstallString

and load it in a process...

Process p = new Process();
p.StartInfo.Arguments = uninstallstring; //may be some tweaks
required as per your application
p.Start();

-cnu
 
D

Duggi

Hi anyone,

I have installed a winforms application vs 2005. It appears in Control Panel
-> Add / Remove Programs.

I have another application .NET and I want uninstall the application
installed programatically using only the name of application that appearsin
Control Panel -> Add /Remove Programas (the product name).

Is it possible ?? Any suggestion about it ? Anyone has any ideas ?

thanks in advance, greetings, regards
--http://www.alhambra-eidos.es/web2005/index...topic.php?p=843www.trabajobasura.com/solusoft

Hope the following link would be helpful

http://bytes.com/forum/thread247471.html

-Cnu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top