Simpler Navigation for Servers and Operating Systems
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
Operating System - Microsoft
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/