467,925 Members | 1,660 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,925 developers. It's quick & easy.

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
Jan 20 '06 #1
  • viewed: 1407
Share:
1 Reply
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\Curr entVersion\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

"Steve Long" <St**********@NoSpam.com> сообщил/сообщила в новостях
следующее: news:u5**************@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

Jan 20 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Matt Frame | last post: by
5 posts views Thread by Leslie Lim | last post: by
reply views Thread by Fan Ruo Xin | last post: by
2 posts views Thread by WWengert | last post: by
reply views Thread by Nattydreadlock | last post: by
2 posts views Thread by =?Utf-8?B?ZnJlZGR5?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.