Power Options cpl - thanks in advance

D

dev_prog

Hi gurus,
I was wondering whether any guru of you can recommend a registry hack
or a command line to turn on the Power Meter icon in the clock area.
As a laptop user, this icon needs to be always shown on my machine.
This is done from the "Power Options" control panel, go to the
"Advanced" tab, the "Always show icon on the taskbar" check box.
For some strange reason, the icon disappears repeatedly from the clock
area, even though the check box (above) is still ticked inside the
control panel.
To re-show it, I have every time to go to the Power Options control
panel and untick then tick again the check box.
If you can recommend a command line to resolve this strange behavior,
that will be appreciated.
Best & TIA.

Dev
 
J

Jon

powercfg /globalpowerflag on /option:batteryicon

--
Jon

In theory, there is no difference between theory and practice. In practice,
there is a big difference.

The reason I decided to write that, was mainly because
 
P

Pennywise

Hi gurus,
I was wondering whether any guru of you can recommend a registry hack
or a command line to turn on the Power Meter icon in the clock area.
As a laptop user, this icon needs to be always shown on my machine.
This is done from the "Power Options" control panel, go to the
"Advanced" tab, the "Always show icon on the taskbar" check box.
For some strange reason, the icon disappears repeatedly from the clock
area, even though the check box (above) is still ticked inside the
control panel.
To re-show it, I have every time to go to the Power Options control
panel and untick then tick again the check box.
If you can recommend a command line to resolve this strange behavior,
that will be appreciated.
Best & TIA.

I have a problem with my optical mouse changing to a wireless one :)

I just copied the mouse.cpl to the desktop as a shortcut.

The trick here is once it's desktop shortcut you can access it's
properties and create a shortcut key.

Won't put in the clock area but make it accessible from the keyboard.
 
D

dev_prog

Thanks Jon for taking the time to read and answer my question.
I didn't know about the "powercfg.exe", I thought it's expected to be a
*.cpl file.
Your command line works fine, thank you. I just replaced the : with a
blank space. Now, the icon still doesn't re-appear after executing the
command, but it re-appears if I log off then log back on.
I was wondering if you have a command or a key stroke to "refresh" the
systray view. I mean similar to using F5 to refresh the desktop.
Thanks again Jon.
 
D

dev_prog

Thanks Pennywise.
I understand and appreciate your simple approach. Actually, I used to
do the same in many instances for many Windows issues, however,
accumulated experience taught me that having a command line or a
registry hack is the elegant and proper solution.
You're right when you say that such solutions are not always available,
you are 100% right. That's why I asked if a guru can recommend this
sort of solution for this particular scenario, and fortunately Jon
pushed back a straight to the point answer.
Thanks again Pennywise for taking the time to read my question and
throw the suggestion.
Best.
 
J

Jon

What you could try is the following 2 commands in sequence.

powercfg /globalpowerflag off /option:batteryicon
powercfg /globalpowerflag on /option:batteryicon

If that works then you could place them into a small batch file or script.
Shouldn't be any need to log on and off - the icon should appear
automatically after running the 'on' command.
 
D

dev_prog

Thanks Jon,
We sound to be from the same school of thinking,
Before replying to you, I composed a batch file with these 2 lines but
this didn't fire up the icon as you might think.
That's why I thought a "refresh" keystroke would help, if exists.
Cheers.
 
J

Jon

This short vbs script will do an F5 refresh (save with a .vbs) extension.

set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.SendKeys "{F5}"


See if that restores your icon to the systray. If it does then I could show
you how to to combine that into one script with the powercfg commands, if
necessary.

--
Jon

It's only a bug if you see it twice.


Latest reports suggest that it was <[email protected]> in message
who said something
like...
 
J

Jon

This vbs script may be better for refreshing the icon following the
powercfg commands - temporarily kills explorer ( before it restarts), but
perhaps better than logging in and out.

For Each Process in GetObject("winmgmts:"). _
ExecQuery ("select * from Win32_Process where name='explorer.exe'")
Process.terminate(0)
Next


--
Jon



Wasn't it "Jon" <[email protected]> in message
, who said something
like......???
 
D

dev_prog

This is to thank you very much Jon for your help.
The problem disappeard with the dos commnand, the icon has been visible
for almost a week not.
I really appreciate your time and advice, and wish you a nice weekend :)
 
J

Jon

And if you're wondering why on earth I wrote that, well
This is to thank you very much Jon for your help.
The problem disappeard with the dos commnand, the icon has been visible
for almost a week not.
I really appreciate your time and advice, and wish you a nice weekend :)

You're welcome.Thanks for the update. Have a good weekend too.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top