I've got a script that runs just fine under the administrator user. But when a domain user executes the script, we get this error message.
CScript Error: Loading your settings failed. (Access is denied. )
This error only happens on a Windows 2008 R2 Server. Which is a member of the domain. It works fine on the Windows 2003 Domain Controller. I did a google search, and found this site http://www.tek-tips.com/viewthread.cfm?qid=609886&page=457
It said, create the following registry key. Which I did, but it didn't help.
HKEY_USERS\.DEFAULT\Software\Microsoft\Windows Script\Settings
Anyone have an idea how to get this to work?
test.vbs :
Wscript.echo "hello"
The run command is :
cscript C:\FileTransfer\TEST\test.vbs
A setting in the ".DEFAULT" user's registry isn't going to affect other users, so that posting's advice is dubious to me, immediately.
Verify that "Users" have "Read" access to "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Script Host\Settings". If they don't, then I suspect this is the cause of the problem that
cscript.exe
is reporting. I'm not aware of the default permission for that key being changed in Windows Server 2008 R2 being changed, though, so I'd wonder how it got changed (assuming that you find it has).If the problem continues you may want to run "Process Monitor" against the user's attempt to execute
cscript.exe
to try and uncover more details.I solved this problem on a windows server 2012R2 machine by creating the following key in the registry
And then granting full control permissions to the IIS Apppool\{AppPoolUser} user on the 'Windows Script Host' key.