Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Sub Command1_Click()
Dim WSH As Object, QQPath As String
Set WSH = CreateObject("Wscript.Shell")
QQPath = WSH.RegRead("HKLM\SOFTWARE\Tencent\PlatForm_Type_List\1\TypePath")
Set WSH = Nothing
ShellExecute 0&, "open", QQPath, vbNullString, vbNullString, 0&
End Sub
Private Sub Form_Load()
Command1.Caption = "QQ"
End Sub
print app.path
即可得到程序运行路径