|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Programatic uninstall?Hello all,
is there a way to programatically uninstall a program via one of the Windows Management classes or one of the Win32 classes? I'm looking for a way to invoke the process that occurs when you click Add or Remove Programs in the control panel. I have some applications in an install base that I not longer have the setup.exe file (Installshield express) for. If I had that, I could just use the command line switches to do it but alas, I don't have a way to tell which versions are installed. I'm looking at the Win32_Product class as a possibility but it would be nice to see an example of how to use the Uninstall method? Anybody??? Thanks in advance for any help. Steve Hello Steve,
AFAIK, actions which are performed when you click Uninstall button are stored in the registry, in the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ section. In here, each subsection lists an installed product; DisplayName parameter indicates name and UninstallString parameter indicates the program which is executed if you hit Uninstall. So, you must be able to use classes in Microsoft.Win32 namespace to extract the command string and Process.Start() to execute it. Hope this helps, Roman Show quoteHide quote "Steve Long" <Steve_Noneya@NoSpam.com> ñîîáùèë/ñîîáùèëà â íîâîñòÿõ ñëåäóþùåå: news:u5xyT7dHGHA.1032@TK2MSFTNGP11.phx.gbl... > Hello all, > is there a way to programatically uninstall a program via one of the Windows > Management classes or one of the Win32 classes? I'm looking for a way to > invoke the process that occurs when you click Add or Remove Programs in the > control panel. I have some applications in an install base that I not longer > have the setup.exe file (Installshield express) for. If I had that, I could > just use the command line switches to do it but alas, I don't have a way to > tell which versions are installed. > > I'm looking at the Win32_Product class as a possibility but it would be nice > to see an example of how to use the Uninstall method? Anybody??? > > Thanks in advance for any help. > > Steve > >
CHANGING DATA TYPE
Changed Date on PC, now project doesn't compile source code changes Get information about Dial Up connections? Compressing (zipping) files dispose the login form Maintaining a response user interface NetUserChangePassword Module not found?? How to close an application?? Parsing a string - please help Maximized MDI childforms.... Anyone? |
|||||||||||||||||||||||