Help getting a power scheme logon script running!

I have tried and tried to get a power scheme script to work.  I can't even seem to get a logon  script to run at all.  

this is a sample batch file that i have changed but to no avail:

@echo off
net use x: \\doman_DNS_name\netlogon

x:
powercfg.exe /change "always on" /monitor-timeout-ac 20
powercfg.exe /SETACTIVE "always on"
c:
net use x: /delete

I am relatively new at working with active directory but I believe I have a pretty good understanding of how it works.  I created OU with the group and users that I wanted the script to run on and linked the GPO to it.  Didn't work.  Also tried just using the Script path to no success either.  So I am not really sure if something is wrong with the batch file or if something is not set in AD to allow the script to run.  I am at a loss and need help.  Thank you in advance
gelemanAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Justin OwensITIL Problem ManagerCommented:
First, I am not sure why you are mapping X: to your DC.  powercfg is builtin to Windows and in the path.  You can run it from C:\.  Next, you may want to turn the echo back on so you can see if there are any error messages.  I cannot see a fault in the two lines that actually invoke the changes you want.  How are you telling GP to run your script and how are you verifying that it is not running?
0
Darius GhassemCommented:
0
gelemanAuthor Commented:
Dr. Ultima,
The X: from the place I got the sample from.  I have modified it a few different ways and it still didn't work.
As far verifying it running i set it up so it could be visible on the logon and I also did a report and it doesn't give a time it has ever run.  So I am not sure what I am doing wrong.  I have a few variations of the script that I ran if you would like to see those.  Other than that I tried it both was as far as running in via the Profile tab in the user file and the GPO.  This the link for which I found out how somebody did it via GPO.

http://lawrencepatterson.com/?p=3

I have actually found two other was to allow the user to adjust the power schemes one being how dariusq suggested and another is adding keys and granting permission on those keys in the default GPO.  I would just much rather figure out how to get it working through it's own GPO if possible.  Appreciate the quick responses.
0
Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

Justin OwensITIL Problem ManagerCommented:
One of the issues you may be facing is permissions.  To change the power settings in Windows XP, you need power user or admin access (or explicit change access to the referenced registry keys).  The page you referenced is for Windows XP, so that is what I assume you are running.  I am not sure your script will work if admin rights don't exist.
Honestly, dariusq's suggestion to use the Energy Star scheme is probably the easier solution.
0
gelemanAuthor Commented:
I did go through and grant the permissions on the registry keys.  Pretty sure it was part of the article that I referenced.  I enabled full control in the edit of the GPO when I set it up.  The current solution I have set is enabling full control in the Domain Security Policy and it seems to work so I am pretty sure I have the permissions set right when I do the GPO.  I'm really thinking that it has something to do with the batch file that I am running but I am not sure.  I really want to try to not to have to install the enery star because it requires a client.  If I can't get the GPO to work right then I'll stick with the edit I did, but I'm hard headed and like to see things work.  Here is one variation of the batch that I used.

@echo off
net use  c: \\doman_DNS_name\netlogon

powercfg.exe /change "always on" /monitor-timeout-ac 20
powercfg.exe /SETACTIVE "always on"

net use c: /delete

and

@echo off
net use  \\doman_DNS_name\netlogon

powercfg.exe /change "always on" /monitor-timeout-ac 20
powercfg.exe /SETACTIVE "always on"

net use  /delete


The thing that really confuses me about the article is it says to put a copy of powercfg.exe to the netlogon.  Shouldn't it be able to reference the system root where it is originally located?
0
gelemanAuthor Commented:
Also I have ran the batch file:

cd\

powercfg /change "always on" /monitor-timeout-ac 20
powercfg /setactive "always on'

/delete

locally and it worked fine

0
Justin OwensITIL Problem ManagerCommented:
Something to consider.  It is a bad idea to program specific usernames into a GPO... Rather than using a specific name, choose "Authenticated Users" when adding those two registry key.  Also, remember that before you click OK twice, that Autenticated Users needs to have Full Control.  Default is Read Only.  
I think your batch file is OK as originally posted, I still think it is a permission issues within the registry.  After making this change, log off and back on twice to see if the changes were propogated correctly on your test machine.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
gelemanAuthor Commented:
The batch file never worked so I went with just add registry keys in the Default Domain GPO and edited them so that the users could have access to their power configurations.  I am not sure why the batch wouldn't work but this way works just fine the batch would just automatically set it for them, instead of setting it themselves.  Thanks for the help.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Active Directory

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.