467,927 Members | 1,845 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Uninstall through WMI

Hi,

I need to build an small application to uninstall an application,
remotely, from the computers in my network. How I can do this through
WMI. It is not an application installed by MSI.
I use this to gather the UninstallString:

keyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninsta ll\" +
subKey;
keyName = "DisplayName";
keyString = "UninstallString";
ManagementBaseObject outParam =
wmiRegistry.InvokeMethod("GetStringValue", inParam, null);
if ((uint)outParam["ReturnValue"] == 0)
{
listBox1.Items.Add(Convert.ToString(outParam["sValue"]));
}

but after I have this uninstall string, I don't know how to use it to
start the uninstallation.
Please help
Thank you

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 19 '05 #1
  • viewed: 2172
Share:
1 Reply
That reg key would contain the command line to run. You'll want to
look for techniques to run a process on the remote machine:

http://www.google.com/search?hl=en&l...remote+process

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Tue, 15 Mar 2005 01:01:52 -0800, Dan Pavel
<my**************@yahoo.com> wrote:
Hi,

I need to build an small application to uninstall an application,
remotely, from the computers in my network. How I can do this through
WMI. It is not an application installed by MSI.
I use this to gather the UninstallString:

keyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninsta ll\" +
subKey;
keyName = "DisplayName";
keyString = "UninstallString";
ManagementBaseObject outParam =
wmiRegistry.InvokeMethod("GetStringValue", inParam, null);
if ((uint)outParam["ReturnValue"] == 0)
{
listBox1.Items.Add(Convert.ToString(outParam["sValue"]));
}

but after I have this uninstall string, I don't know how to use it to
start the uninstallation.
Please help
Thank you

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Nov 19 '05 #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
5 posts views Thread by Adam Clauss | 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.