Subscribe to How-To Geek

Welcome to the How-To Geek Forums

We encourage you to register on our forums and post any questions you might have. The How-To Geeks monitor this forum and will respond to your question quickly.

How-To Geek Forums » Windows XP

(Solved) - Turn off monitor with shortcut instead of Power Options Properties

(14 posts)
  • Started 8 months ago by methodical
  • Latest reply from LH
  • Topic Viewed 1818 times

  • Remove Solved Status

methodical
Posts: 3

I've browsed both this site and others and can't seem to find any info on how to write a shortcut that will "turn off monitor" without going into Power Options Properties (Win XP Pro).

I think I found a handy "%windir%\system32\rundll32.exe user32.dll, LockWorkStation" short cut target on this site and was wondering if someone knew of something similar for turning the monitor off.

It would be absolutely stellar is someone knew how to create a single icon that could not only lock the workstation, but turn off the monitor at the same time.

Many thanks in advance.

Posted 8 months ago #
Top
 
methodical
Posts: 3

Nevermind. I found this.
Change Power Schemes Using Shortcuts
Just created a profile that shuts off the monitor in 1 min, then used the above link to turn it into a shortcut, and then used a windows macro editor to execute the shortcut and log out at the same time.

Thanks to everyone who took 2 seconds to look at my question.

Posted 8 months ago #
Top
 
jd2066
Justin
Posts: 3792

Thanks to everyone who took 2 seconds to look at my question.

That seems a bit inconsiderate.
This forum has many people who spend their time on their forum trying to help out when they can but not everyone knows the answer to all questions or has the time to answer them.
There are many people that just opened the topic to see if they help and when they didn't know the answer they left either because they knew someone that did have the answer would come along or they did not have the time to answer it.

As for your question I would recommend downloading the program Nircmd from http://www.nirsoft.net/utils/nircmd.html and then you can create a shortcut to "nircmd.exe monitor off" which will turn off the monitor which having to change power schemes which you may want to keep set to a normal value most of the time.

Posted 8 months ago #
Top
 
thegeek
The Geek
Posts: 1887

The proper way to do this is to use the NirCmd utility, passing these arguments:

nircmd.exe monitor off

http://www.nirsoft.net/utils/nircmd.html

You could also use the Wizmo utility to lock and turn off the monitor in one step: http://www.grc.com/wizmo/wizmo.htm

Justin is correct, it sometimes takes people a while to research the proper solution. [edit: just realized I posted the same thing as Justin... more proof that it's the correct solution!]

Posted 8 months ago #
Top
 
jd2066
Justin
Posts: 3792

It appears I was too slow in appending the answer of using NirCmd to the end of my post. It seems great geeks think alike :-)

Posted 8 months ago #
Top
 
thegeek
The Geek
Posts: 1887

This is a really great question though, and I'm going to turn this into an article.

Posted 8 months ago #
Top
 
jd2066
Justin
Posts: 3792

That would make a good article.
Also after looking at your wizmo example I remembered that NirCmd could do that too and more.
Examples:
Wait 1 second and then turn the monitor off: nircmd.exe cmdwait 1000 monitor off
Lock, wait and turn off monitor (See Note Below Before Using): nircmd.exe lockws cmdwait 1000 monitor off
Create a desktop shortcut to run NirCmd to turn off the monitor: nircmd.exe cmdshortcut "~$folder.desktop$" "Turn Off Monitor" monitor off

Notes:
The Lock and Monitor off command seems to conflict with Windows Vista User Account Control (UAC)'s Secure Desktop feature for me. As to weather it works with that on or with Windows XP, I don't know. Would require some testing.

Posted 8 months ago #
Top
 
LH
LH
Posts: 7487

And POWERCFG
POWERCFG -Change -monitor-timeout-ac 0

Posted 8 months ago #
Top
 
ScottW
ScottW
Posts: 6609

LH, wouldn't that powercfg command permanently change the monitor timeout in the current scheme to 0? Also, that's 0 seconds which might actually disable the feature. Why don't you experiment with it on your system and let me know. I'm not sure I could undue such a setting during the 0 seconds that the display is on!

EDIT: OK, I figured out a smart way to test this. I went into Power Options and set the display timeout to "Never" in the current scheme then used powercfg to look at the value of the timeout value. It's 0, so 0 means never timeout, never turn off the display.

C:\>powercfg -query 381b4222-f694-41f0-9685-ff5bb260df2e 7516b95f-f776-4464-8c53-06167f40cc99
Power Scheme GUID: 381b4222-f694-41f0-9685-ff5bb260df2e (Balanced)
Subgroup GUID: 7516b95f-f776-4464-8c53-06167f40cc99 (Display)
Power Setting GUID: 3c0bc021-c8a8-4e07-a973-6b14cbcb2b7e (Turn off display after)
Minimum Possible Setting: 0x00000000
Maximum Possible Setting: 0xffffffff
Possible Settings increment: 0x00000001
Possible Settings units: Seconds
Current AC Power Setting Index: 0x00000000
Current DC Power Setting Index: 0x0000012c

Posted 8 months ago #
Top
 
methodical
Posts: 3

Sorry Justin,

Much like it's sometimes hard to see sarcasm over text, it's sometimes hard to see genuine comments when they are intended as such. I can see how my "2 seconds" comment may have come across the wrong way. I offer my apologies. I really was thankful for the people who at least bothered looking. I think this site is fantastic.

Anyway, just thought I would clear up the misunderstanding.

Best,

PS - Almost forgot. Many thanks to all for the suggestions.

Posted 8 months ago #
Top
 
raijin
Posts: 54

I'm not sure whether to post this in a new thread or just put it here since it's a similar inquiry. I was wondering whether there's a command or a program out there that shuts down your computer while exiting out of any programs after a specified # of hrs. For example say I want to run an error check on my hard drive at night, but I don't want to leave my computer on the whole night, is there some sort of program that would shut the computer down after about 2 or 3 hrs. Or if I'm running Norton at night is there something that would do the same while exiting Norton before shutting down?

Posted 8 months ago #
Top
 
jd2066
Justin
Posts: 3792

@ScottW: According to the Microsoft article at http://support.microsoft.com/kb/324347 , the powercfg.exe program takes minutes for that and a value of 0 is equal to never.
The article is for Windows Server 2003 but I'm sure it would apply to other versions of Windows too.

Posted 8 months ago #
Top
 
ScottW
ScottW
Posts: 6609

Justin, I was using a page at TechNet for the powercfg command line options:
http://technet.microsoft.com/e.....48940.aspx

However, this page didn't mention that a value of 0 means disabled. Neither of these pages tells the whole story. As you say, the command line option that LH specifies takes minutes, but note the output from the -query option that I posted above where it says: "Possible Settings units: Seconds". I don't see how you specify seconds, but apparently it's "possible". Finally, the use of powercfg as described in the article for Windows Server 2003 is substantially different than the way it is used in Vista. I can see this in the parameters listed in the TechNet article on powercfg for Vista and from the command line options using "powercfg -?". For example, the Vista version of powercfg seems to require a GUID instead of a user-friendly name for power schemes in most commands, such as -query. In summary, a very confusing command with poor documentation.

Posted 8 months ago #
Top
 
LH
LH
Posts: 7487

My bad for not actually testing that before I posted. But it was past my bedtime.

Posted 8 months ago #
Top
 

RSS feed for this topic

Reply

You must log in to post.

Our Friends
Getting Started


About How-To Geek
What Is That Process?
svchost.exe
jusched.exe
dwm.exe
ctfmon.exe
wmpnetwk.exe
mDNSResponder.exe
wmpnscfg.exe
rundll32.exe
wfcrun32.exe
Ipoint.exe
Itype.exe
Wfica32.exe
Mobsync.exe
conhost.exe
Dpupdchk.exe Adobe_Updater.exe

Copyright © 2006-2009 HowToGeek.com. All Rights Reserved.