可以使用automation object model
在你脚本执行之前先调用下面的Function
Function Load_Addins(testPath)
Dim qtApp 'As QuickTest.Application
Dim blnNeedChangeAddins
Dim arrTestAddins
Set qtApp = CreateObject("QuickTest.Application")
arrTestAddins = qtApp.GetAssociatedAddinsForTest(testPath)
blnNeedChangeAddins = False
For Each testAddin In arrTestAddins
If qtApp.Addins(testAddin).Status <> "Active" Then
blnNeedChangeAddins = True
Exit For
End If
Next
If qtApp.Launched And blnNeedChangeAddins Then
qtApp.Quit
End If
If blnNeedChangeAddins Then
Dim blnActivateOK
blnActivateOK = qtApp.SetActiveAddins(arrTestAddins, errorDescription)
If Not blnActivateOK Then
MsgBox errorDescription
WScript.Quit
End If
End If
If Not qtApp.Launched Then
qtApp.Launch
End If
qtApp.Visible = True
qtApp.Open testPath
Set qtApp = Nothing
End Function