Home All Groups Group Topic Archive Search About

How to invoke programmatically 'Add, Remove Programs'

Author
14 May 2005 6:56 PM
Jack
Hello,
            How to invoke programmatically 'Add, Remove Programs' window
with my program highlighted in it,
or even better
how to invoke one step further and display window starting uninstallation of
my program?
Your ideas please.

Author
14 May 2005 11:32 PM
MikeD
"Jack" <replyto@newsgroup> wrote in message
news:OGIbYaLWFHA.3620@TK2MSFTNGP09.phx.gbl...
> Hello,
>            How to invoke programmatically 'Add, Remove Programs' window
> with my program highlighted in it,
> or even better
> how to invoke one step further and display window starting uninstallation
> of my program?
> Your ideas please.


Why not just run your uninstall program? You need to be sure to immediately
close your program; otherwise, it won't uninstall properly (or require a
reboot to fully uninstall if the uninstaller supports that).

--
Mike
Microsoft MVP Visual Basic
Author
15 May 2005 12:15 AM
Randy Birch
Shell "rundll32.exe shell32.dll,Control_RunDLL appwiz.cpl,,0", vbNormalFocus

No way I know of to select a particular entry in the listing.  The number at
the end of the command indicates which panel to show; 0=add/remove programs,
1=add new programs, 2=add/remove windows components, 3=set program access
and defaults (XP SP2 only I believe).
--

Randy Birch
MS MVP Visual Basic
http://vbnet.mvps.org/
----------------------------------------------------------------------------
Read. Decide. Sign the petition to Microsoft.
http://classicvb.org/petition/
----------------------------------------------------------------------------



Show quote
"Jack" <replyto@newsgroup> wrote in message
news:OGIbYaLWFHA.3620@TK2MSFTNGP09.phx.gbl...
: Hello,
:            How to invoke programmatically 'Add, Remove Programs' window
: with my program highlighted in it,
: or even better
: how to invoke one step further and display window starting uninstallation
of
: my program?
: Your ideas please.
:
:
Author
16 May 2005 3:12 PM
Jeff Johnson [MVP: VB]
"Jack" <replyto@newsgroup> wrote in message
news:OGIbYaLWFHA.3620@TK2MSFTNGP09.phx.gbl...

>            How to invoke programmatically 'Add, Remove Programs' window
> with my program highlighted in it,
> or even better
> how to invoke one step further and display window starting uninstallation
> of my program?

Many installers store this information in the registry under
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall in
the UninstallString value. You could read that and Shell() that string.

AddThis Social Bookmark Button