Welcome to the MP3Car.com forums.
You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. Registering will also remove advertisements. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!
If you have any problems with the registration process or your account login, please contact contact us.
|
04-26-2004, 07:56 PM
|
#1
|
|
FLA
Join Date: Dec 2003
Location: Portland, OR
Posts: 1,287
|
Desktop Button for standby or hibernate?
Anybody able to do me a huge favor and make me a desktop button I can click to put my computer into standby or hibernate? I had a hibernate button once, but that...was a long long time ago. I cant find it anymore
Thanks! -Jeff
DOH....Found it..... http://www.newfreeware.com/desktop/249/
The only problem is I kind of need a button, and this is just a tray icon.
IWhen I searched a different set of keywords i found that I had posted this last year. Ever have a Monday? I need a beer.
__________________
00 Focus LX soon to be boosted!
88 Escort GT Turbo DFI
Last edited by gospeed.racer : 04-26-2004 at 08:08 PM.
|
|
|
04-26-2004, 08:54 PM
|
#2
|
|
Raw Wave
Join Date: Jan 2004
Location: SilverSpring Maryland
Vehicle: 2003/Infiniti/G35 Sport Coupe
Posts: 2,957
|
Wrote this cause I'm such a nice guy.
It runs completly off the command line, just pass it a shutdown command. Run without a command to get a list of the commands it supports. Just link a shortcut to this and put it on your desktop to get a desktop button.
Souce is included below. Attached is the binary, it will run on anything microsoft windows.
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include <windows.h>
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
if (lstrcmpi(lpCmdLine,"hibernate")==0)
SetSystemPowerState( FALSE, FALSE );
else if (lstrcmpi(lpCmdLine, "standby") == 0)
SetSystemPowerState( TRUE, FALSE );
else if (lstrcmpi(lpCmdLine,"restart")==0)
{
ExitWindowsEx(EWX_REBOOT, 0);
} else if (lstrcmpi(lpCmdLine,"shutdown")==0)
{
ExitWindowsEx(EWX_SHUTDOWN, 0);
} else if (lstrcmpi(lpCmdLine,"blankscreen")==0)
{
SendMessage(GetDesktopWindow(), WM_SYSCOMMAND, SC_MONITORPOWER, 2);
} else if (lstrcmpi(lpCmdLine,"logoff")==0)
{
ExitWindowsEx(EWX_LOGOFF, 0);
}
else
MessageBox(NULL, "Usage: shutdown <parameter>\n\nValid Parameters:\n\tblankscreen\n\tlogoff\n\thibernate\ n\treboot\n\tstandby\n\tshutdown\n\nBrought to you by http://www.digitalwheelz.com", "Invalid Command Parameter", MB_ICONSTOP | MB_OK);
return 0;
}
|
|
|
04-26-2004, 08:54 PM
|
#3
|
|
Raw Wave
Join Date: Jun 2000
Location: Nashville
Vehicle: $800 1995 Plymouth Neon
Posts: 2,649
|
__________________
Debt as of 1/1/05: $34,354.48
Debt as of July 4, 2007: $0.00 explanation
Total spent on wedding so far: $3885.79
Thanks to everyone for your support.
I'M DEBT FREE!!
|
|
|
04-26-2004, 08:56 PM
|
#4
|
|
FLA
Join Date: Dec 2003
Location: Portland, OR
Posts: 1,287
|
Thanks guys, yer awesome!
__________________
00 Focus LX soon to be boosted!
88 Escort GT Turbo DFI
|
|
|
04-27-2004, 03:05 AM
|
#5
|
|
Raw Wave
Join Date: Aug 2003
Location: Essex, England
Vehicle: Honda Prelude 2.2 VTEC / Ford Anglia 105E
Posts: 2,224
|
|
|
|
04-27-2004, 09:12 AM
|
#6
|
|
MySQL Error
Join Date: Sep 2003
Location: Beach City, Socal
Vehicle: 89 Supra Turbo, 04 Toyota Matrix XR
Posts: 4,032
|
isn't it Windows has an ultility called "shutdown.exe"?
With some switch, you can have it either shutdown, reboot, or hibernate.
After figure out which switch, you can create a bat file for it.
|
|
|
04-27-2004, 11:47 AM
|
#7
|
|
Raw Wave
Join Date: Jan 2002
Location: Temple Terrace, Fl.
Vehicle: '05 Shadow Mica Matrix XR
Posts: 2,606
|
Here's how you can set up a restart button on your desktop:
1. Create a shortcut (Right-click on desktop, select New > Shortcut).
2. For location, type the following:
shutdown -r -t 0
3. Click Next, enter a name for the shortcut ("Restart" is appropriate), and click Finish.
When you click your Restart shortcut, Windows XP will reboot *automagically*!
The "-r" switch tells XP to reboot. If you'd like the shortcut to shut off your PC instead, change it to "-s"; to simply log off, change it to "-l". The "-t 0" sets the timeout (in seconds), so up this value if you find the need for it. To force running applications to close, add "-f" -- be careful with this one!
For more information on Shutdown, type "shutdown" in a command prompt window (Start > All Programs > Accessories > Command Prompt), or search for Shutdown in Windows XP's Help and Support Center.
__________________
/////Alpine PXA-H700
/////Alpine MRV-F345
Aura MR62 (F and R)
Sansa Clip
All wires by Knukonceptz.
My Current MP3s
IamDefiler.com
Still have tons of parts for sale!!! MB's, CPUs, Fans, etc. PM me and I will send a list.
|
|
|
04-27-2004, 02:33 PM
|
#8
|
|
Newbie
Join Date: Aug 2003
Posts: 50
|
Yes, but thats not hibernate or standby :P
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 04:51 PM.
|
|