Re: Detecting Battery Mode programatically
From: Scott Fenstermacher (sfenstermacher_at_lrs.com)
Date: 12/30/04
- Next message: Scott Fenstermacher: "Re: Current logged on user and session time."
- Previous message: Torgeir Bakken \(MVP\): "Re: Run code based on subnet"
- In reply to: Motor Wu: "Detecting Battery Mode programatically"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 30 Dec 2004 14:51:51 -0600
Actually, IIRC, Service Pack 2 already has code to prevent installing if the
system is running on battery power... Try it.
-- Scott Fenstermacher Network Engineer Levi, Ray and Shoup, INC "Motor Wu" <motorwu@kimo.com> wrote in message news:mea8t0hi663pjug99dal53t7761vjgqr6k@4ax.com... > Is there a way to detect weather my laptop is using the battery or > power-cable programatically in Windows Script? I have an IBM ThinkPad > A30 with Windows 2000 SP3 with a background service that takes up a > large processing power when activated. If possible, I'd like to > shut-down this service automatically whenever I un-plug the laptop, > then start it back up again when I plug it back in. > > I have search the forum for solution and try to use WMI win32_battery > to get information on my Windows XP Pro, but it seems not work, for > the properitiers of "BatteryStatus", it just return "1 - Other" when > my notebook is using battery and return "2 - unknow" when I attach > power cable to my notebook, but it should return "charging" or "using > battery". > > Why I want to get information of power status ? I want to > automatically install windows xp sp2 patch for all my office desktop > and notebook sliently , but it seems not work on notebook when it's > using battery power. > > Is somebody can help me ? Thanks in advance. > > Motor.
- Next message: Scott Fenstermacher: "Re: Current logged on user and session time."
- Previous message: Torgeir Bakken \(MVP\): "Re: Run code based on subnet"
- In reply to: Motor Wu: "Detecting Battery Mode programatically"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|