General
cancel
Showing results for 
Search instead for 
Did you mean: 

QTP needs to be restarted for system environment variable changes to take effect

MithileshIndurk
Occasional Collector

QTP needs to be restarted for system environment variable changes to take effect

QTP needs to be restarted for system environment variable changes to take effect

 

I am changing MQSERVER variable to a value that I need runtime using . This is required to access websphere MQ

 

    

 Set objWSH = CreateObject("WScript.Shell")
 Set objSystemVariables = objWSH.Environment("SYSTEM") 
 objSystemVariables(MQVariableName) = MQVariableValue

 But when I try to read a valid queue manager, it gives me error 2058 ( MQRC_Q_MGR_NAME_ERROR)

 

When I restart QTP, that environment variable reflects and I can access MQ manager successfully without changing any code. What is the best way to not have to restart QTP in these circumstances.

1 REPLY
Dennis Handly
Acclaimed Contributor

Re: QTP needs to be restarted for system environment variable changes to take effect

This is the wrong forum (and in the future the wrong company) for software questions.
https://community.saas.hpe.com/