Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / April 2006

Tip: Looking for answers? Try searching our database.

uninstalling 3rd party application

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Gregory Khrapunovich - 18 Apr 2006 15:12 GMT
Hi,
I would like my C# program to uninstall our old installation. Is it possible
from C# to do the same think that user does, i.e get the list of installed
applications (similar to Add/Remove programs), select an application, and
command it to uninstall?

I am using Visual Studio 2003, but I can use VS 2005 if necessary.

If this is a wrong newsgroup, please advice where I should post this
question.

Thank you.
Gregory
Dmytro Lapshyn [MVP] - 19 Apr 2006 07:55 GMT
Hi,

This actually depends on whether your old application's installer is
MSI-based. If this is the case, you are lucky 'cause you can P/Invoke to the
MSI API to query for installed applications and then use the same API to
command the target application to uninstall itself.

If you are not that lucky, explore the following registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall

It should list all installed applications with command lines to be run in
order to uninstall them (the UninstallString value).

> Hi,
> I would like my C# program to uninstall our old installation. Is it
[quoted text clipped - 9 lines]
> Thank you.
> Gregory

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.