Below is a simple program I use from a CRM application. It works great, except I have one program that is looking for a file in the directory it starts from. Is there a way to specify a "Start in:" directory in this script?
On Error Resume Next
Dim App_Path
App_Path = "C:\MY PROGRAM.EXE"
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run Chr(34) & App_Path & Chr(34)
If Err.Number <> 0 Then
msgbox App_Path & " - This application could not be started or is installed in a different location. Please contact BLAH for help.",16,"Application unable to start."
Err.Clear
End If
On Error Resume Next
Dim App_Path
App_Path = "C:\MY PROGRAM.EXE"
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run Chr(34) & App_Path & Chr(34)
If Err.Number <> 0 Then
msgbox App_Path & " - This application could not be started or is installed in a different location. Please contact BLAH for help.",16,"Application unable to start."
Err.Clear
End If