QTP license server settings flaky

Question ID: 104610
0
0

How can I change the license server for QTP? I’ve changed the environment variable, but it is still trying to connect to the old license server when I start QTP? What gives?

Marked as spam
Posted by (Questions: 3, Answers: 1)
Asked on September 21, 2012 10:46 am
16 views
Answers (2)
3
Private answer

It's probably in the Windows Registry. I have seen this happen before, where there is a 'disconnect' between the Environment variable information, and the registry keys for the server. You can modify the registry settings to match the Environment variable, and you should be good. I have a sample that shows the keys to modify that can be modified or enhanced depending on what you are trying to do and is pretty straight-forward.

You can run a VBScript file on the machine that you want to modify. Paste the following code in Notepad, change the dummy license name (in this example replace all instances of ''TestServer'' with the actual license server you want to use, and save it as a .vbs file. You can then double-click on it to run it.

Const constHKEY_CURRENT_USER = &H80000001
Const constComputer = ''.''

Set objReg = GetObject(''winmgmts:{impersonationLevel=impersonate}!\'' &_
constComputer & ''rootdefault:StdRegProv'')

'Set Registry Settings for License Manager for QTP in Software Hive
strKeyPath = ''SoftwareMercury InteractiveLicense ManagerServerList''
strValueName = ''FT-Unified1.0''
strValue = ''TestServer''
objReg.SetStringValue constHKEY_CURRENT_USER, strKeyPath, strValueName, strValue

strKeyPath = ''SoftwareMercury InteractiveLicense ManagerServerList''
strValueName = ''FTAddins1.0''
strValue = ''TestServer''
objReg.SetStringValue constHKEY_CURRENT_USER, strKeyPath, strValueName, strValue

strKeyPath = ''SoftwareMercury InteractiveLicense ManagerServerList''
strValueName = ''AllServers''
strValue = ''TestServer''
objReg.SetStringValue constHKEY_CURRENT_USER, strKeyPath, strValueName, strValue

'Set the Environment variable to match the other keys
strKeyPath = ''Environment''
strValueName = ''LSFORCEHOST''
strValue = ''TestServer''
objReg.SetStringValue constHKEY_CURRENT_USER, strKeyPath, strValueName, strValue

Set objReg = Nothing

MsgBox ''QTP License Server information changed.''

Marked as spam
Posted by (Questions: 2, Answers: 464)
Answered on September 21, 2012 10:47 am
Thank you . That worked changing registry
( at September 21, 2012 12:31 pm)
1
Private answer

Try adding the Environment Variable LSFORCEHOST with value of your license server name instead of the normal LSHOST.

Marked as spam
Posted by (Questions: 16, Answers: 791)
Answered on September 21, 2012 12:08 pm
Note: DO not have LSHOST and LSFORCEHOST on the same machine. QTP 11 install LSFORCEHOST by default were QTP 10 and below installs LSHOST.
( at September 21, 2012 3:41 pm)