How to use VB script to modify the setting “Allow other HP products …” in QuickTest Professional Setting(QTP)

This option is located on a UI level in QTP under QTP-> Tools -> Options-> Run tab. The following VB script can be executed:

Dim WshShell

‘Dim WScript

set WshShell =CreateObject("WScript.Shell")

WshShell.SendKeys "%"

WshShell.SendKeys "T"

wait (1)

WshShell.SendKeys "O"

wait (1)

WshShell.SendKeys "R"

wait(1)

WshShell.SendKeys "{TAB}"

WAIT(1)

For i=1 to 3

WshShell.SendKeys "{TAB}"

Next

wait(1)

WshShell.SendKeys " "

wait(1)

The following VB script can be used to modify the value of a registry key which holds the value for this option:

Dim WshShell

set WshShell =CreateObject("WScript.Shell")

WshShell.Regwrite "HKEY_CURRENT_USER\Software\Mercury Interactive\QuickTest Professional\MicTest\AllowTDConnect", 00000001, "REG_DWORD"

Set WshShell=nothing

Advertisements

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