I am executing a script which automates the 'runas' command by taking credentials as command line options along with a command to an executable. From a local machine this would be run as:
wscript vbrunas.vbs domain\admin password command.exe
This works locally, however when deployed as a Windows Script Host distribution package with the appropriate command line options, it fails after authenticating the runas command. This was verified by removing the automated password entry in the script, so that at deployment time, the package prompts the client for the password, which is entered but the actual executable fails to run. Numerous executables were scripted (trivial applications such as notepad, calc, etc) but none of them ran at deployment time.
Does this have to do with the script being run from the LocalSystem account?