先試方法一
加上路徑參數
ShellExecute hwnd, "open", "C:\ABC\A.exe", vbNullString, "C:\ABC", 1
不行就試方法二
換路徑再換回來
Private Sub cmdGo_Click()
Dim prev_dir As String
' Save the current directory.
prev_dir = CurDir
' Go to the desired startup directory.
ChDir "C:\ABC"
' Shell the application.
ShellExecute hwnd, "open", "C:\ABC\A.exe", vbNullString, vbNullString, 1
' Restore the saved directory.
ChDir prev_dir
End Sub
再不行就另請高明了