Micro Focus QTP (UFT) Forums

Full Version: Load Add-in at execution time
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am executing multiple QTP scripts via a Windows Script batch file and Windows Scheduler. One of the multiple scripts listed in the batch file use the SAP Add-in, while the others do not. Is there anybody out here that knows how to select and/or remove Add-ins from the Add-in Manager at run-time? Here's the Script code:

Code:
Const strEnvironment = "QA"
Const strBatchSetLoc = "[location]"

'---------------------------------------------------------------------------------------------

Dim qtApp, qtTest
Set qtApp = CreateObject("QuickTest.Application")
'Set ObjCmd = createobject("wscript.shell")
qtApp.Launch
qtApp.Visible = True

qtApp.Open (strBatchSetLoc&strEnvironment&"\[test name 1]"), True
Set qtTest = qtApp.Test
qtTest.Run         
qtTest.Close

qtApp.Open (strBatchSetLoc&strEnvironment&"\[test name 2]"), True
Set qtTest = qtApp.Test
qtTest.Run         
qtTest.Close

...

'---------------------------------------------------------------------------------------------

qtApp.quit
Set qtTest = Nothing
Set qtApp = Nothing

Is there a better method than this? Any help is appreciated.