From a vbscript I'm trying to get the user profile directory to expand and also run an executable with command line arguments. It is the spaces in the command line args that seem to be causing an issue. I'm close but no matter what I try I can't seem to get it.
This works:
WshShell.Run """%UserProfile%\test.exe"""
What I'm trying to do that does not work:
WshShell.Run """%UserProfile%\test.exe 8.8.8.8 8989 -e cmd.exe"""
I get an error of "The system cannot find the file specified."