Sub Run(ByVal sFile, sArgs)
' Create a shell object
Set shell = CreateObject("WScript.Shell")
' Run the file
shell.Run Chr(34) & sFile & Chr(34) & " " & sArgs, 1, false
Set shell = Nothing
' Run a file like this: Run "FILENAME", "ARGUMENTS"
It should be able to launch the file. Hope it works for you!
Just one more request. I need to run my program at User = Administrator, Password level of credentials. Are there a few lines I can add to your script to make the program run at the desired user/pwd level ?
Your script works fine in the command prompt window, but when I automate the call from a proprietary macro environment, I need to clarify the level of credentials to run at.
Thank you. I was afraid that the only tool available was runas. Unfortunately it requires interacting with a dialog box to provide the Administrator Password, which is not possible when the script is being automatically called by a macro.
I did google a lot before asking. Seems like there is third party tool called Tqcrunas which does the job I require.