Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
share|improve this question
    
Note that instead of 'HKEY_USERS\.DEFAULT\Software\Microsoft\Windows Script\Settings' it should be 'HKEY_USERS\.DEFAULT\Software\Microsoft\Windows Script Host\Settings' – Gary Brunton Jul 24 '15 at 23:49
up vote 0 down vote accepted

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.

share|improve this answer
    
@Evan, I couldn't find a value named "Users" in"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Script Host\Settings" Should I create it? – NeerPatel Feb 2 '11 at 19:25
    
@DjFarout: I'm not talking about a value, but rather the permission on the registry key. Navigate to the key in REGEDIT, and with the key highlighted in the left pane click "Edit" and "Permissions". You'll get a security permission dialog that will list the various users and groups that have permissions specified on that key. Verify that "Users" is listed in that list and that "Read" is shown with a ticked box in the lower part of the dialog when "Users" is highlighted. – Evan Anderson Feb 2 '11 at 19:28
    
System\Users was enabled. I added "Domain\Domain Users". This didn't fix it. (I didn't restart the servers.. do you think it matters?) – NeerPatel Feb 2 '11 at 21:46
1  
@Evan: Ok, I installed Process Monitor, and I found this error. "3:43:56.0777086 PM cscript.exe 4000 RegCreateKey HKU\.DEFAULT\Software\Microsoft\Windows Script Host ACCESS DENIED Desired Access: Maximum Allowed" I added Domain\Users and it fixed the problem!! Thanks!! – NeerPatel Feb 2 '11 at 21:52
1  
I can confirm that on my windows server 2012R2 I came across this problem and fixed it by creating the HKEY_USERS\.DEFAULT\Software\Microsoft\Windows Script\Settings key and updating it's permissions. It took quite some time to figure out what was going on and fix it with your guy's help. – Gary Brunton Jul 10 '15 at 22:01

I solved this problem on a windows server 2012R2 machine by creating the following key in the registry

HKEY_USERS\.DEFAULT\Software\Microsoft\Windows Script Host\Settings

And then granting full control permissions to the IIS Apppool\{AppPoolUser} user on the 'Windows Script Host' key.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.