You may want to look into using a MSI (windows installer) file to do this
for you.
It supports rollback on error and "clean removal" (assuming you can
correctly write the MSI).

Microsoft has open source xml based toolset to support this in the form of
Wix.
http://wix.sf.net

There is also NSIS (Nullsoft scriptable installer system...or something like
that)...which is open source too
Doesn't use "Windows Installer", but will give you ARP (Add/Remove Programs)
entries and allow you to touch up the target system.  some nice GUI tools
with it too.
http://nsis.sourceforge.net/Main_Page


I'm 99.99% sure NSIS & Wix have command line tools that you can use to
integrate them into an automated build system.

if you have the money you may want to look at...

[1] www.InstallShield.com
[2] www.wise.com
[3] http://www.advancedinstaller.com/

(I have only used Wix, I have not used the other tools listed here.  They
are listed in no significant order, buyer beware)

Phil







-----Original Message-----
From: Discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] Behalf Of Matthew
Brindley
Sent: Monday, August 25, 2008 6:14 PM
To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM
Subject: [ADVANCED-DOTNET] Programmatically adding/removing windows
components


Morning folks,

Is anyone aware of an API or platform function(s) for interacting with
the "Add/remove windows components" dialog (the one you'll see in XP
down the LHS of the add/remove programs dialog).

I'm writing a deploy application for new Windows Server 2003/8
servers, and I'd like a way to programmatically:
        - Disable Internet Enhanced Security Configuration (IESC)
        - Uninstall the "Application Server" component (including IIS and
friends).

Permissions isn't a problem, it'll be running under the admin account
with elevated permissions.

Uninstalling the app server stuff isn't that important, I can always
just disable their services, but removing IESC is very important.

I'm using C#, but certainly don't mind using P/Invoke or even a
different language/framework if needed.

Thanks in advance!

--
Matt

===================================
This list is hosted by DevelopMentor.  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to