Running "Cscript Setup.js", why would I be getting "Permission Denied" errors when creating the temporary batch file (line 266) or the log file (line 285)? These files are supposed to be in my own %tmp% directory (the strings appear correct). Is this script running as a different user?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Running "Cscript Setup.js", why would I be getting "Permission Denied" errors when creating the temporary batch file (line 266) or the log file (line 285)? These files are supposed to be in my own %tmp% directory (the strings appear correct). Is this script running as a different user?
Okay, solved this. Change line 271 to 'WSShell.Run("cmd /c " + strBatFile, 0, true);' to avoid the protection violation. All done.
CScript or WScript? It should work with WScript
Setup.js requires elevated privileges to run. If it doesn't prompt for them, something is not right.