QTP Video – How to do a clean uninstall of QTP

Due to many reason — such as a bad install — you might need to completely uninstall QTP and reinstall it. Here are the steps to follow for a clean uninstall of Quick Test Professional.

Steps to Perform a Clean Uninstall

  1. First if you currently have a QTP seat license – you will need to back up your QTP’s LSERVRC file. The LSERVRC file contains the license codes that have been installed. Whenever a new license is registered to a machine, the license code is automatically added to this file. This file is usually in the ‘Program Files\HP\QuickTest Professional\bin’ folder. If not go to start/run and type %LSERVRC% in the open textbox:

  2. Open the file in notepad. To find the files directory – in notepad – click File>Save As and in ‘Save As’ dialog click the ‘Save in’ drop down. This will show you the file’s path. Mine was in “D:\Documents and Settings\All Users\Application Data\HP\Functional testing\License“. Save the file to your desktop. If you are using a concurrent license you can skip this step.
  3. Navigate to control panel>add remove programs in XP or control panel>programs>uninstall a program in windows 7
  4. Find HP QuickTest Professional and in XP ‘Remove’ and in Win7 ‘Uninstall’
  5. If you are using QTP with QC you want to also remove the ‘HP QuickTest Add-in for ALM-QC’
  6. Once QTP is uninstalled — delete any QTP directory still on your system, Usually the QTP directory is under Program Files\HP. Delete the ‘QuickTest Professional’ folder and the ‘QuickTest Add-in For ALM-QC’ if it exists. Caution: If you are saving QTP test locally, in this directory, make sure to backup the folder before deleting the QTP directory.
  7. Next remove all the QTP references in the registry. Go to start>run and type in regedit.
  8. Find the following keys in the registry and delete them:
  • HKEY_CURRENT_USER\Software\Mercury Interactive\QuickTest Professional
  • HKEY_LOCAL_MACHINE\SOFTWARE\Mercury Interactive\QuickTest Professional

The above steps are usually all you need to do but there are a few more steps you might want to check just to be safe

  1. Look under your Windows\system 32 folder and make sure that the BHOManager.dll does not exist. If it does delete or rename it
  2. Look under your Windows\assembly folder and look for the following files. If they exist delete them:

    • Mercury.QTP.Agent
    • Mercury.QTP.CustomServer
    • Mercury.QTP.WpfAgent
    • policy.6.5.Mercury.QTP.CustomServer
    • policy.8.0.Mercury.QTP.Agent
    • policy.8.0.MngUtils
    • policy.X.X.Mercury.QTP.WpfAgent (“X” could 9.5 or 10.0. This item may appear repeated, just different version, so delete them all)

  3. Reboot your machine


     

Succeeding with Automation Awesomeness. I’ll show you how!

Test automation, like all development efforts, is difficult. Most projects don't succeed. You can do better! Sign up and receive exclusive content like my free 10 Proven Actionable Steps for Automation Awesomeness from some of the biggest testing leaders in the industry. Let me help YOU succeed with Test Automation! Sign up now:

Leave a comment:

21 comments
Anish Pillai - September 12, 2011

Thanks.. :) I was looking for this.. :)

Reply
    Joe Colantonio - September 12, 2011

    Anish Pillai » Great –I haven’t got many views on it yet so I’m glad it helped you! Cheers~Joe

    Reply
Shirin - April 18, 2012

Hi Joe,
Thank you for all your fantastic posts. My question is regarding setting up QTP license (seat); I had a trial one and I got another one (company did) which is good for 90 days but when I install it,it is successful but when I open QTP it asks again for the license. This time when I try to paste the license again it says it’s already been installed. If I delete the LSERVRC, it lets me install the license but again QTP won’t open. Thanks so much in advance.

Reply
    Joe Colantonio - April 20, 2012

    Shirin » Hi Shirin – are you trying to install a permanent license or another trial license on the same machine? I don’t think installing a trial license over an existing trial license would work.

    Reply
      Shirin - April 24, 2012

      Hi Joe, the second license is a seat license(90days). I got it from SAP, and it should work but it doesn’t. SAP gave me a patch which didn’t help either.

      Reply
        Joe Colantonio - April 24, 2012

        Shirin » Hi Shirin – I think the issue is HP creates some registry setting that knows if a user has already installed a temp license. This is so someone does not keep installing a demo license over and over again. You might want to contact HP – I’m sure they know how to resolve. Cheers~Joe

        Reply
          Shirin - April 25, 2012

          Thanks Joe. I’ll see what they come back with.

          Reply
Rucha - September 27, 2012

Hi..Joe Thank you for your video.
Initially I had a trial version, now it got expired.
I have gone through instructions given for QTP uninstallation. but, still I’m facing liscene issue which is not allowing QTP to open.
Can you please help me on this ?
Thanks in advance ..!!

Reply
    Joe Colantonio - September 28, 2012

    Rucha » Hi Rucha – are you now trying to install a licensed version of QTP or are you trying to install an eval copy on the same machine after you do a clean un-install? Are you getting an error message? You can’t re-install an eval copy on the same machine. There must be a reg setting that keeps track of if an eval has already been installed. I don’t know how to get around that. Cheers~Joe

    Reply
jass - January 23, 2013

Hi Joe,

It worked but agin when I try to install I get some .dll file failed to register HRESULT and later when i complete installation I get run time error in Qtpro.exe.

Please help!!

Reply
    Joe Colantonio - January 23, 2013

    jass » From HP KB article (KM1212104) Below are some of the causes found on cases so far:

    Operating system’s User Account Control (UAC) is enabled
    Operating system’s Active Template Library file (atl.dll) is not registered
    Lack of full administrator rights on machine being installed (part of Administrators Group. Being part of Power Users Group is not enough for installation of product)
    Installation files are located on a shared drive and individual files integrity get corrupted via network during installation specifically
    Downloaded Installation files Integrity of has being compromised during or after the download process, yet before making use of file.
    Bad reading feature of files due to software extracting data. A virtual drive which holds all the installation files (DVD ISO image) is reading improperly the files
    Operating system behaves abnormally due to missing default DLL files required by installation files
    Fix
    There is no quick fix for this sort of errors during installation. Below are some of the common troubleshooting steps done by support and/or customers when such were encountered:

    Operating system’s User Account Control (UAC) is enable

    Ensure the User Account Control is temporarily disabled/turned-off during the installation. This is an installation requirement as indicated under “Setting Up QuickTest Professional > Troubleshooting and Limitations – Installing QuickTest” of the “HP QuickTest Professional Installation Guide”. For example for version 11 is page 61.

    For more information about minimum requirements for QTP, see Document ID KM183747 – What are the minimum permissions required for QuickTest Professional (QTP)?

    Operating system’s Active Template Library file (atl.dll) is not registered

    Please review Document ID KM524927 – Error: “Error 1904. Module failed to register. HRESULT -2147024770.”

    Lack of full administrator rights on machine being installed (part of Administrators Group. Being part of Power Users Group is not enough for installation of product)

    Customer’s IT department needs to get involved to allow the installation to be performed by a fully privileged administrator type user. For more information about minimum requirements for QTP, see Document ID KM183747 – What are the minimum permissions required for QuickTest Professional (QTP)?

    Installation files are located on a shared drive and individual files integrity get corrupted via network during installation specifically. A symptom may be if every time the issue happens all the DLL filenames indicating issue and error numbers are always the same

    Ensure that installation files are located on the local machine (no shared drive or even mapped drive) before starting the installation process.

    Downloaded Installation files Integrity of has being compromised during or after the download process, yet before making use of file.

    Download a new set HP product ISO file (or set of installers):

    Download via:

    FireFox or any other browser THAT IS NOT INTERNET EXPLORER.

    If downloading from a FTP URL, then using third party FTP clients (i.e. FileZilla, SmartFTP, etc) or Microsoft DOS Command prompt feature to connect to FTP sites

    If only Internet Explorer, “try” the “Download manager” provided by the HP SSO Portal (offered as an option when about to download the ISO files).

    Use an HP source. For more information see Document ID KM182258 – Where/How to download a trial/evaluation/full version of Functional Testing products?

    Perform a MD5 Checksum of the downloaded files (It’s a known issue that IE could download corrupted files with size more than 800 MB and QTP 11 is around 3.6 GB.). For more instructions, see Document ID KM00204207 – How to evaluate the MD5 Checksum of an ISO File?

    Bad reading feature of files, for example a virtual DVD/CD drive (via a software) which holds all the installation files (DVD ISO image) is reading improperly the files
    Use different software to read the files as a virtual DVD/CD (i.e. DAEMON TOOLS – shareware); or
    Extract the contents of the ISO image file (i.e. WinRar – freeware)

    Operating system behaves abnormally due to missing default DLL files required by installation files, also known as corrupted environment

    Re-image operating system:
    If Operating System image used on machine with issues is a corporate image plus other machines show same issue, then get a non-customized OS image to re-image them

    If other machines with same OS image do work, using the corporate OS image would be fine

    Find/Install/register all missing DLL (using tools such as “Dependency Walker”) before attempting a new installation or skip/ignore the error to finalize the process and then manually register the files (unless require dependencies are missing)

    Reply
jass - January 23, 2013

Thanx for your quick response Joe

Will check and let you know if it works or not :)

Reply
Lavanya - February 16, 2013

HI Joe,
can i reinstall qtp 11 version after uninstalling the expired qtp 11 in my PC?? wil that work?

Reply
Rajesh - March 1, 2013

Hi Joe, Thanks for this information.

i tried to do clean uninstallation but unable to delete the file Policy.9.5.mercury.qtp.wpfagent.

Can you please provide information on any ways to delete it.

Reply
workit - April 19, 2013

Hi

I had UFT on my machine but uninstalled did all the cleanup but still can’t be able to install QTP11.00 as it throws an error saying already a higher version is installed, any specific solutions? Thanks :)

Reply
    Joe Colantonio - April 22, 2013

    workit » Sorry – I haven’t been able to repro. As of right now, there is no specific specialized uninstallation process for UFT 11.5 or higher, so HP recommends:

    Review Requirements:

    Important. Same as QuickTest Professional (QTP) or Service Test (ST), full admin rights and UAC off is required before doing steps below. For more information see Document ID KM183747 – What are the minimum permissions required for QuickTest Professional (QTP)?

    Check the optional tasks
    (Optional) Backup licensing information:
    Seat license: back up the LSERVRC file. For more information see Document ID KM175077 – What is the lservrc file and where to find it?

    Concurrent license: Save contents of LSHOST/LSFORCEHOST Windows environment variable(s). For more information see Document ID KM175036 – How to set the LSHOST or LSFORCEHOST system variable?

    (Optional) Backup Test/Resources stored locally (if on ALM/QC, ignore step)

    Uninstall any non-core add-in/utilities.

    Remove any of the below items if exist on machine from the “Programs and Features” under Windows Controls Panel’s (or Add/Remove Programs for operating systems older than Windows Vista), before continuing:

    Unified Functional Testing (UFT) Add-in for Application Lifecycle Management (ALM) / Quality Center (QC)
    .NET Extensibility Add-in
    WPF/SilverLight Extensibility Add-in
    Java Extensibility Add-in
    Web Extensibility Add-in (if displayed)
    Extensibility Accelerator Note: ensure to backup EA projects before uninstalling it

    Uninstall Unified Functional Testing from the “Programs and Features” under Windows Controls Panel’s (or Add/Remove Programs for operating systems older than Windows Vista)

    Reply
jaswanth - November 30, 2013

hi joe,it is asking liscence still now!!!!
im used qtp 11.0
pls help mee!
thank you!!!

Reply
    Joe Colantonio - November 30, 2013

    Are you trying to install QTP eval version on a machine that already has had QTP on it? If so then this is normal behavior

    Reply
kamal - February 10, 2014

Hi Joe,
After doing the clean uninstall of qtp 11.0, will it be possible to install the evaluation or free trial version of UFT ???
Or , is there any approach of installing free trial version of UFT ??

Reply
    Joe Colantonio - February 23, 2014

    Sorry by design you can not install another eval copy on a machine that already had an eval on it.

    Reply
Click here to add a comment

Leave a comment: