Quick test professional

QTP Tips QTP codes QTP Faqs and more

Uninstall a software using vbscript , QTP

This works for uninstalling most applications. In this example I will show how AutoCAD 2005 can be uninstalled using a VBScript. Open Regedit and look in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall search for the application and find a the product code that is in GUID format looking like this: {5783F2D7-0301-0409-0002-0060B0CE6BBA} It might be something else for you. The code below will uninstall AutoCAD 2005 as well as Express Tools. Copy the code below into Notepad and give the file the extension vbs.on error resume next
Set WshShell = CreateObject("WScript.Shell")
' Uninstall Express Tools
WshShell.Run "msiexec /x {5783F2D7-0311-0409-0000-0060B0CE6BBA} /q",1,true
' Uninstall AutoCAD 2005
WshShell.Run "msiexec /x {5783F2D7-0301-0409-0002-0060B0CE6BBA} /q",1,true

Reference:JTBWorld blog


February 20, 2008 - Posted by | Uninstall a software using QTP, Uninstall a software using vbscript | , , , , , ,


  1. I follow all steps, but i did not what to do with the vbs file which i created on desktop? Should I copy it somewhere else? Thank you in advance on answer

    Comment by Natasa | June 30, 2009 | Reply

  2. I hope that you still watching on this site

    Comment by Natasa | June 30, 2009 | Reply

  3. Hi natasha,

    Once u create vbs file, u can execute the file or else u can store the same file with .bat extn and execute the same on the command prompt, or else call the same batch file with full path to automate the same.

    Hope it works,

    Comment by Prashanth | August 26, 2009 | Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: