I checked out that site & it was helpful. I tried using icacls to modify the permission on c:\windows\system32\cscript.exe but it kept saying permission was denied. I then copied cscript from \system32 to the same folder where the .vbs file is and I was then able to set the permissions on the copy of cscript to give (RX) access to it.
Originally Posted by Fou-Lu
I also found several pages that said to create these registry keys:
HKEY_USERS\.DEFAULT\Software\Microsoft\Windows Scripting Host
HKEY_USERS\.DEFAULT\Software\Microsoft\Windows Scripting Host\Settings
and set the permissions to allow EVERYONE Read access, which I did.
Doing those things made the
CScript Error: Loading your settings failed. (Access is denied. )
error go away, but the batch file still won't execute.
The batch file now contains a line like this:
if I run it from the command line it works perfectly, but the
c:\scripts\labor\scheduled\cscript.exe //B c:\scripts\labor\scheduled\labor.vbs /store_list:"store1;store2" /start_date:"2013-01-21" /end_date:"2013-01-24"
still doesn't work. I set the permissions on the .bat, and .vbs files and cscript to allow read & execute access to these accounts:
"nt authority/iusr" (shows up as iusr)
Do you have any more ideas?