两种我都试了下,第一种方法要启动QTP才能获取到,第二种我找了几遍都没找到写安装路径的注册表,还有没有别的办法呢T-T作者: 小扁 时间: 2013-11-21 20:16
Private Sub Command_readreport_Click()
Dim objShell As Object
Dim qtpPath As String
Dim reporterPath As String
Set objShell = CreateObject("wscript.shell")
qtpPath = objShell.regread("HKEY_CLASSES_ROOT\Applications\QTPro.exe\shell\open\command")
MsgBox qtpPath
End Sub