Dmartin05
(Fresh Scripter)
2006-03-22 04:42 PM
Setting System Standby To Never

Here is my question:

Is there a way that i could run a remote script that will make all my pc's "System Standby" setting to Never?


NTDOCAdministrator
(KiX Master)
2006-03-22 06:07 PM
Re: Setting System Standby To Never

do some searching for Power Management

I'm not sure if you can or not natively, but I think Microsoft has an exe that might allow some type of changes like that.


Les
(KiX Master)
2006-03-22 07:30 PM
Re: Setting System Standby To Never

PowerCfg will do it on XP but users need admin rights or you need to open up a reg key.

Malak
(Lurker)
2006-03-30 06:04 PM
Re: Setting System Standby To Never

This is exactly what I'm looking to do as well. I've assigned the staff's user group to the local admins group. What is the syntax for running the powercfg command in the kix script? Forgive me but I am a little bit of a newbie in regards to Kix.

-Malak


ShawnAdministrator
(KiX Supporter)
2006-03-30 06:26 PM
Re: Setting System Standby To Never

There is a discussion about powercfg and syntax here:

Power Settings

To run powercfg.exe, just shell out to it in your script like:

SHELL "%comspec% /c powercfg.exe parameters"

-Shawn


Malak
(Lurker)
2006-04-04 04:02 PM
Re: Setting System Standby To Never

Thanks for the help but I it's not working. Leave it to Microsoft to throw in a little catch. I have had to use the " marks around the always on active state since it is a two word scheme. That seems to be confusing the KIX engine. Is there another way to skin this cat? Or am I just goofing up.

SHELL "%comspec% /c powercfg.exe /setactive "always on""

-Malak


Mart
(KiX Supporter)
2006-04-04 04:07 PM
Re: Setting System Standby To Never

The space in Always on gets screwed up by the command line and not by kix.
This is a "limitation" of the command line just like when you use net start "Some service" you must use quotes around some service to protect the space in it. Command line just chops it at the first space and then (unless something exists with the resulting name) it fails.


AllenAdministrator
(KiX Supporter)
2006-04-04 04:45 PM
Re: Setting System Standby To Never

Use Single Quotes on the outside of your command line.

SHELL '%comspec% /c powercfg.exe /setactive "always on"'