473,403 Members | 2,338 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

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
1 2322
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Matt Frame | last post by:
I wrote a small assembly to test the process of placing it into the Global Assembly Cache but now I cannot remove it. When I hi-light and click delete I get the following: Assembly 'Assembly...
5
by: Leslie Lim | last post by:
I had link my 4 of workstations to server with MySql. 1 pc of my pc can run a software which can update MsSql perfectly but not others(3 failed). I tried to add System Dsn data source for Control...
2
by: Dave A | last post by:
I have an application that runs in the system tray (taskbar notification area) and it runs at startup. Occasionally I need to release a new version. I have created a deployment project in .Net. ...
0
by: Fan Ruo Xin | last post by:
I installed Stinger in my PC (w2k). I need to do a quick compare between DB2 OLAP server and DB2 Cube Views. And I only found DB2 Cube Views version8.1 trial code from IBM website. I didn't want to...
5
by: Adam Clauss | last post by:
I am needing to automate some installation tasks. I first need to determine if there is already a version of a program installed. The program appears in the Add/Remove Programs in control panel,...
9
by: VJ | last post by:
I am deploying a Package having applications developed using VB.NET and VS.NET 2003. I am using the Packaging feature provided with the VisualStudio. I can use the package to creates shortcuts for...
2
by: WWengert | last post by:
I am developing a Windows application using VS2005 Pro (VB). The solution includes a setup project. I sent the setup files to a tester and he installed and used the program successfully. I then...
0
by: Nattydreadlock | last post by:
Hello, I'm having some problems installing Visual Studio 2005. I'll briefly explain what's the history of the problem here. First I installed VS 2005 beta 2. I uninstalled it later via the...
2
by: =?Utf-8?B?ZnJlZGR5?= | last post by:
I would like to uninstall app form both local and remote computers without the user knowing what is going on. I have admin right to all the computers so this is not a problem. Can this be done? ...
1
by: Luke | last post by:
Hey all, i'm currently working on a project for our IT group. what this program does is lists all the installed programs on the remote machine for the admin. what i'm trying to add is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.