Friday, 17 June 2011

Read Value from Registory / QTP / WScript

Here an example to get get the location where QTP is installed

REM Create shell script object
  Set WshShell = CreateObject(“WScript.Shell”)
REM in variable store the registry key path
  sKey =”HKLM\SOFTWARE\Mercury Interactive\QuickTest Professional\Configuration_UI\Packages\WebFormsPackage\Settings\ConfigurationFile”

REM here using the shell object we can read the registry key value
sQTPpath= WshShell.RegRead(sKey)

msgbox sQTPpath
set WshShell = nothing

No comments:

Post a Comment

Which one is right ?