How to perform a clean uninstall and reinstall of QuickTest Professional

Here are the steps for a clean uninstall/reinstall of QuickTest Professional :

1. Backup the LSERVRC file. Such contains licensing information. If you do not save it, you will need to reenter the license code.

Note: If you are using a concurrent license, step #1 isn’t required since such file should be located on the license server machine. However, if file is found on client machine, it is recommended to back it up.

2. Backup your test scripts if such reside under QTP’s installation folder (Default: <QTP Install folder>\Tests)

3. For QuickTest 8.2 and higher, uninstall any non-core add-ins from Add/Remove Programs under Control Panel (Start menu -> Control Panel ->Add Remove Programs)

Notes:

• Add-in versions higher than 6.5 and below or equal to 9.2 have separate uninstall process, meaning their own particular items within the Add/Remove Programs to allow their removal

• Add-in versions for QTP 6.5 and below, 9.5 and higher come bundled with core, so uninstall such to remove add-ins

• Extensibility Add-ins such Web, .NET and Java (Delphi Add-in isn’t considered of this type) are separate items under Add/Remove Program listing

• Quality Center Add-in is always a separate add-in that requires a particular removal/uninstallation.

• IMPORTANT: If the necessary steps to first remove add-ins (for those which aren’t considered bundled with QTP core) aren’t performed, there may be repercussions such as preventing installation of newer versions of QTP and/or other add-ins such as the Quality Center one.

4. Uninstall QuickTest (Control Panel -> Add Remove Programs).

5. Go to the install directory of QuickTest. The default directory is "C:\Program Files\Mercury Interactive\QuickTest Professional/" or "C:\Program Files\HP\QuickTest Professional".

Note: When working with a 64bits operating system, ensure to locate the above folders under C:\Program Files(x86)\…

6. Delete all the directories under this directory except for the "Tests" folder since it might contain test scripts. If you backed up the test scripts to a different directory in step 2, you can delete the Tests folder also.

Note: The above steps can be performed via command line:

rmdir /s /q "C:\Program Files\HP\QuickTest Professional"

The following steps relating to HKEY_CURRENT_USER must be performed for each user on a Citrix or Terminal Services environment, and for any user that has run QuickTest Professional)

7. Open the registry editor (Start -> Run -> regedit)

8. Navigate to the following registry key:

HKEY_CURRENT_USER\Software\Mercury Interactive\QuickTest Professional

9. Backup/export mentioned key (right click, select "Export", then save the file)

10. Delete the "QuickTest Professional" folder (including all the keys and values under it)

11. Navigate to Browser Helper Objects section:

HKEY_CURRENT_USER\Software\Mercury Interactive\Browser Helper Objects\AgentsKeys

12. Backup/export mentioned key (right click, select "Export", then save the file)

13. Browse sub keys under "AgentsKeys" and remove/delete ones showing a "Path" value pointing to a QTP installation location. For example on a QTP10/11 machine:

HKEY_CURRENT_USER\Software\Mercury Interactive\Browser Helper Objects\AgentsKeys\{95D11A40-0F78-45A1-AADA-E89DBBF6C5B7}

"Path"="C:\\Program Files\\HP\\QuickTest Professional\\bin"

Note: When "Path" entry isn’t correct, Web Add-in could not function correctly. After deleting it (recommended), ensure performing steps/solutions of following article in given order – Browser operations (Back, Forward, Home, Refresh, Navigate, Object, etc.) return "General Run Error" or are not executed

14. Navigate to the following registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Mercury Interactive\QuickTest Professional

Note: When working on a 64bits operating system, the above key may not exist, instead following key should:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Mercury Interactive\QuickTest Professional

15. (Important) The HKEY_LOCAL_MACHINE\SOFTWARE\Mercury Interactive\QuickTest Professional key contains license information. HP Support recommends backing up the key first (right-click on the "QuickTest Professional" key and select Export).

16. Delete the "QuickTest Professional" folder (including all the keys and values under it).

Steps 7 to 16 could be done accordingly via command line (or a batch file or with extension *.bat), for example here are some of those, not all:

Export/Backup registry:

REGEDIT /e C:\HKCU_QTP.reg "HKEY_CURRENT_USER\Software\Mercury Interactive\QuickTest Professional"

REGEDIT /e C:\HKLM_QTP.reg "HKEY_LOCAL_MACHINE\Software\Mercury Interactive\QuickTest Professional"

64bit OS: REGEDIT /e C:\HKLM_QTP.reg "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Mercury Interactive\QuickTest Professional"

Delete registry:

REG DELETE "HKCU\Software\Mercury Interactive\QuickTest Professional" /f

REG DELETE "HKLM\Software\Mercury Interactive\QuickTest Professional" /f

64bit OS: REG DELETE "HKLM\SOFTWARE\Wow6432Node\Mercury Interactive\QuickTest Professional" /f

If it were required to Import settings from exported REG files, then:

REGEDIT /s C:\HKCU_QTP.reg

REGEDIT /s C:\HKLM_QTP.reg

17. (If found on specified path) Delete BHOManager.dll in %windir%\system32 folder. For 64bits, is possible to find it under %windir%\SysWOW64 folder. If not found such could have being removed uninstall process. Best to check by doing search on entire file system (all hard drive units, exclude shared drives as well as CD/DVD drives).

18. (If found on specified path) Delete the following assemblies from the C:\Windows\assembly\ directory:

• 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)

19. If working with QuickTest Professional 11.0 and NET 4.0 support was enabled, then delete the following directory and contents under Windows folder (Go to "Start" menu, select "Run", type "%windir%", click "Ok"):

• C:\Windows\Microsoft.NET\assembly\GAC_32\Mercury.QTP.Agent\

• C:\Windows\Microsoft.NET\assembly\GAC_64\Mercury.QTP.Agent\ (Note: If 64bits support is enabled)

• C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Mercury.QTP.WpfAgent

Note: Following command lines may help achieving required tasks:

rmdir /s /q %windir%\Microsoft.NET\assembly\GAC_32\Mercury.QTP.Agent

rmdir /s /q %windir%\Microsoft.NET\assembly\GAC_64\Mercury.QTP.Agent

rmdir /s /q %windir%\Microsoft.NET\assembly\GAC_MSIL\Mercury.QTP.WpfAgent

20. If the Firefox browser is installed go to Tools->Add-ons and manually remove the QuickTest Professional PlugIn

21. For QTP 9.5 and above, delete/rename the associated application data "QuickTest Professional" directory. (Start -> Run -> type "%appdata%\HP" -> Ok). Following are command line options:

Delete folder:

rmdir /s /q "%appdata%\hp\QuickTest Professional"

Rename/Backup folder:

rename "%appdata%\hp\QuickTest Professional" "QuickTest Professional.bak"

22. Reboot the machine (recommended)

23. Install or reinstall QuickTest Professional.

24. If step #1 is applicable to machine in question, copy back the lservrc file into the correct directory. Note: As long as the locking code (which is machine specific) did not change, you should be able to use QuickTest Professional without having to re-enter the license code.

Advertisements

2 thoughts on “How to perform a clean uninstall and reinstall of QuickTest Professional

  1. Johnf956

    Hi there, just became aware of your blog through Google, and found that it is really informative. Im going to watch out for brussels. Ill be grateful if you continue this in future. Lots of people will be benefited from your writing. Cheers! ekddafdfedka

    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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s