Originally Posted by Old Pedant
An alternate suggestion:
Execute a ".bat" file and have that ".bat" file contain the command.
If need be, PHP can create the ".bat" file.
The advantage is that you can actually then LOOK at the ".bat" file to see if it contains what you expect it to contain *and* you can execute it by hand to make sure it works when you do so.
I have even done this when invoking ".vbs" from other ".vbs" code. Just so I can be sure that I'm issuing the command I think I'm issuing.
That is a great idea. I tried it and it creates the .bat file with no problems. I can run the .bat file from the command line and it works. However, the shell_exec(<filename.bat>) still won't work. I get this error:
CScript Error: Loading your settings failed. (Access is denied. )