I have an application that needs to be uninstalled regularly (needing
elevated privaleges) as our users are all restricted user accounts.

I don't know how to write a VBScript that will launch the Windows
uninstaller process.

The file in the program folder is called
"c:\TestLabUpdate\uninst32.isu" but how can I call this? And how do I
do it with admin privaleges?

Thanks for any help

-Fran-

Re: Scripting an uninstall process by JTW

JTW
Wed Apr 12 19:02:26 CDT 2006

You first need to determine what the uninstall command line is. If it
appears in the Add/Remove applet, the you can get the uninstall string
from the registry. Navigate to
"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
. Under this will be a subkey for this application and within that
will be an Uninstall key. That value is the uninstall command.

Once obtained you can use the WScript.Shell object
(http://www.dx21.com/SCRIPTING/VBSCRIPT/ViewOItem.ASP?OID=204&VL=A) to
launch that command line.

Re: Scripting an uninstall process by Fran

Fran
Wed Apr 12 21:37:01 CDT 2006

Thanks for the link!

When I run the unistall routine as was illustrated, I will need to run
this as an administrator or other elevated rights account correct?
Currently the users have Domain User privaleges and this is usually
not enough to unistall apps. So how would I use something like RunAS
to execute this?

-Fran-

>You first need to determine what the uninstall command line is. If it
>appears in the Add/Remove applet, the you can get the uninstall string
>from the registry. Navigate to
>"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
>. Under this will be a subkey for this application and within that
>will be an Uninstall key. That value is the uninstall command.
>
>Once obtained you can use the WScript.Shell object
>(http://www.dx21.com/SCRIPTING/VBSCRIPT/ViewOItem.ASP?OID=204&VL=A) to
>launch that command line.

Re: Scripting an uninstall process by JTW

JTW
Thu Apr 13 09:13:02 CDT 2006

You can
*) experiment with command lines to try and implement RunAs with the
uninstall within a script
*) use RunAs to execute the entire script
*) package the script using a script packager as found in script
studios such as Admin Script Editor
(http://www.dx21.com/HOME/ARTICLES/PR/PRODREV.ASP?CID=3) or
PrimalScript (http://www.dx21.com/HOME/ARTICLES/PR/PRODREV.ASP?CID=17)
*) utilise an application delivery product, such as SMS 2003 to execute
the uninstall command line