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'm using a logon batch script to copy some dll files into the c:\windows\system32 folder and register them with the regsrv32 command.

However, both actions fail.

I'm applying the script here: user configuration\policies\scripts (logon/logoff)/logon

The script itself does get executed. However, it just doesn't perform anything that requires admin credentials.

How can I fix this?

share|improve this question
Can your script do what it needs to do on computer startup rather than login? – Dan Jun 8 '12 at 17:57
This script isn't in the default domain GPO. It's in a GPO assigned to a user group. – Force Flow Jun 8 '12 at 17:58
@ForceFlow That doesn't matter for what Dan was asking. – MDMarra Jun 8 '12 at 17:59
up vote 5 down vote accepted

Using a User Logon Script policy will always run the script as the user. There's no getting around that. As an alternative, you could consider using a Computer Startup Script. These are excecuted as the Local System account, which will have privs roughly equivilent to a local administrator account.

share|improve this answer
ok, I added it as a compupter startup script, rebooted the workstation, but the script didn't appear to run at all. The script creates a text file on the desktop when it runs (so that I know when it actually runs) – Force Flow Jun 8 '12 at 18:57
Did you wait for the group policy refresh interval to pass or run gpupdate /force? Also, is the script in a place where Domain Computers has read access? – MDMarra Jun 8 '12 at 19:31
Yes, I ran gpupdate /force. Yes, the script is freely accessible by domain computers in mydomain.local\netlogon. – Force Flow Jun 8 '12 at 19:37
What does gpresult /H tell you? Is the policy being applied? If so, is there anything useful in the event log? – MDMarra Jun 8 '12 at 19:54
Right, but again, Startup scripts are Computer settings not user settings. By filtering on a user group you're essentially nullifying the Startup script because it's a computer setting... you can't filter a Computer setting based on a user or user group. You could filter it based on a computer object or computer group though. – joeqwerty Jun 9 '12 at 1:41

Your Answer


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.