Script to disable sleep mode in Vista and XP

Hi Guys

I'm using a software that deploy patches to vista and XP machines once a week and the bigest issue I have now is that the patches get deploy at 3 AM on Saturday and most of the desktop machines are on sleep or hybernate mode at that time so the patch fail to install. I want to create a script that disable the sleep mode on both vista and XP machines so they stay on during the patch deployment. I have the feeling that is just a registry key change but I can't figure it out were I can find it.
Any idea?
Thank you
intelglobeAsked:
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.

cmcawoodCommented:
If you are on a domain, you could do this via group policy.  Do you want to permanently disable or just temporarily disable?
0
intelglobeAuthor Commented:
Well I was thinking to disable on Friday morning and enable back again on Monday after the patch are deploy but i'm afraid that will complicate things more so I think the safest way will be to permanetly disable and see if the users make any complaints.
0
intelglobeAuthor Commented:
Sorry I forgot to mention that some customer are on teh domain and some are just on a workgroup
0
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

and235100Commented:
Use powercfg in a batch file?

@echo off
powercfg /change "Always On" /standby-timeout-ac 0
powercfg /change "Always On" /hibernate-timeout-ac 0
powercfg /setactive "Always On"
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
and235100Commented:
0
intelglobeAuthor Commented:
Thank you. That work.
0
intelglobeAuthor Commented:
I also try to change it on Group policy so I create an OU for the machines that need to be change and mouve them in that OU. Can't find the place were I can disable it. I already look under Local Computer policy, System but I can't find anything about Power settings. This is under a Windows 2003 DC and I need to have the policy work with both Vista and XP
Thank you
0
and235100Commented:
XP/2003 doesn't have native adm's to control power settings - server 2008/vista policies are available.
http://www.energystar.gov/index.cfm?c=power_mgt.pr_power_mgt_ez_gpo is the closest you are going to get.
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
Windows Vista

From novice to tech pro — start learning today.