Turn Off / Restart icon on desktop

G

GoldHawk

Is there any easy way to put a Turn Off and / or Restart button on the
desktop (without using Regedit) ?

With thanks.
 
B

Big_Al

GoldHawk said this on 2/13/2009 1:36 PM:
Is there any easy way to put a Turn Off and / or Restart button on the
desktop (without using Regedit) ?

With thanks.

For restart:
Right click on the desktop, new -> shortcut.
Put this as the command
%windir%\System32\shutdown.exe -r -t 0

the -r = restart the -t = time delay = 0 seconds.

Same logic for a shutdown except us
%windir%\System32\shutdown.exe -s -t 0

the -s = shutdown same for -t
 
B

Big_Al

Big_Al said this on 2/13/2009 1:51 PM:
GoldHawk said this on 2/13/2009 1:36 PM:

For restart:
Right click on the desktop, new -> shortcut.
Put this as the command
%windir%\System32\shutdown.exe -r -t 0

the -r = restart the -t = time delay = 0 seconds.

Same logic for a shutdown except us
%windir%\System32\shutdown.exe -s -t 0

the -s = shutdown same for -t

You can also click the change icon button. There is a pretty good red
power button for the restart in %SystemRoot%\system32\SHELL32.dll. And
I use the large right pointing green arrow head in that same file for
the restart.
 
G

GoldHawk

That's brilliant. Thank Big Al. Works a treat. I've used those icons, too.

It's the first time I've used that shortcut wizard. I've always created
desktop shortcuts by right clicking from the file or folder in Explorer. So,
leant something new.

Would it be too simple if using the same logic but replacing -s or -r with
-h would give a Hibernate shortcut ?

With thanks.

Mike
 
B

Big_Al

GoldHawk said this on 2/13/2009 6:04 PM:
That's brilliant. Thank Big Al. Works a treat. I've used those icons, too.

It's the first time I've used that shortcut wizard. I've always created
desktop shortcuts by right clicking from the file or folder in Explorer. So,
leant something new.

Would it be too simple if using the same logic but replacing -s or -r with
-h would give a Hibernate shortcut ?

With thanks.

Mike

If your PC supports it, try it, what can happen but get an error message!
 
J

ju.c

Create a desktop or quick launch shortcut to open the
"Turn off computer" dialog box:

1. Open Notepad and paste the following:

Set wshshell = CreateObject("Shell.Application")
wshshell.ShutdownWindows

2. Save-as Shutdown_Box.vbs (or any name + .vbs)

3. Move the file somewhere then create a new shortcut
to it on the desktop. To change the icon to the
shutdown icon browse here and look for the icon in
the window: C:\WINDOWS\system32\shell32.dll

4. If you want it on the Quick Launch area, just move
it there from the desktop.


ju.c
 
G

GoldHawk

Unfortunately, this didn't work for Hibernate. No error message, just didn't
do anything. It's not a great issue, but would have been nice if it had.
 
G

GoldHawk

The solution for Shutdown and Re-start suggested by Big Al worked fine but
just for my own education I thought I would try your suggestion.

After putting shortcut on the desktop, I had this error message:

Script: C:\WINDOWS\Shutdown by Mike.vbs
Line: 1
Char: 49
Error: Expected end of statement
Code: 800A0401
Source: Microsoft VBScript compilation error

Any further thoughts please ?
 
G

GoldHawk

Sorry, I must have copied the code incorrectly (possibly by putting the 2
lines into 1). I've tried this again and it works fine by opening up the
Standby / Turn Off / Restart / dialogue.

Thanks.
 
J

ju.c

You're welcome, I'm just supplying another option.

PS: The shortcut for Hibernate is:
%WinDir%\system32\rundll32.exe powrprof.dll,SetSuspendState Hibernate


ju.c
 
T

Tim Meddick

Try typing this into a shortcut on your desktop:-

C:\WINDOWS\system32\RUNDLL32.EXE PowrProf.dll,SetSuspendState

The shortcut is to the file Rundll32.exe (which has a boring icon so you
might like to change that!) but it won't work unless you put a space and
then the rest of it (i.e PowrProf.dll,SetSuspendState) in there too.

This 'should' send your computer into hibernation. Tell me how it goes for
you?

Cheers, Tim Meddick, Peckham.
 
G

GoldHawk

Tim

This is the same solution as suggested by ju.c on the other string of posts
and, as you say, works well. Does the job for me. With thanks.

Mike
Evesham UK
 
G

GoldHawk

If that was directed at me, I apologise. I wasn't aware I was deleting posts,
and indeed, don't even know how I'd do that.
 
T

Twayne

GoldHawk said:
If that was directed at me, I apologise. I wasn't aware I was deleting
posts,
and indeed, don't even know how I'd do that.

He says that every once in awhile for some reason. It's irrelevent
because you can not delete or rescind in any way any post. Once it's
posted, it's there period and can't be deleted even by the one who
posted it.

HTH,

Twayne
 
J

ju.c

"I wasn't aware I was deleting posts, and indeed, don't even
know how I'd do that."

Like this. See, there are no other posts. I deleted them. Hold
the left mouse button down and drag it, highlighting previous
messages, then click the delete button.
 
O

Olórin

ju.c said:
"I wasn't aware I was deleting posts, and indeed, don't even
know how I'd do that."

Like this. See, there are no other posts. I deleted them. Hold
the left mouse button down and drag it, highlighting previous
messages, then click the delete button.

I think the misunderstanding is arising from the difference between snipping
the text of posts from earlier in a thread (which a responder can do) and
deleting posts in their entirety from the server (which is not easily
available to mere mortals). Whether this is a genuine misunderstanding or
just perversity is open to debate.
 
T

Tim Meddick

No, it wasn't me who said anything about "deleting posts", in fact, I've had
the same accusations thrown my way and I really don't know why. I didn't
think deleting anything from my own local computer would affect the
newsserver whatsoever, AND, I don't even delete anything from my own
computer anyway! - So, anyone, what's going on with these slanderous
allegations?
 
A

Al Falfa

Tim said:
No, it wasn't me who said anything about "deleting posts", in fact, I've
had the same accusations thrown my way and I really don't know why. I
didn't think deleting anything from my own local computer would affect
the newsserver whatsoever, AND, I don't even delete anything from my own
computer anyway! - So, anyone, what's going on with these slanderous
allegations?

Tim,
s/deleting posts/not quoting previous posts in this thread/

Outlook Express has a setting to quote the post to which you are
replying. You never quote. You never address anybody by name (many
people do not, especially ju.c himself).

In your post, it is not clear to whom you are replying, nor about what.

I know what you are talking about, because ju.c keeps on bleating about
people "deleting posts". Many have tried (in vain) to tell him how to
reword his sentence so that it would make sense, but he never responds.
He also never addresses anybody by name. Hence the confusion.

The irony here is that ju.c himself is the cause of the problem. By
top-posting his .sig *before* all the text that *he* quotes, he is
telling all proper newsreaders (Outlook Express is not a proper one)
to delete all text that follows the '-- ' marker.

Notice how *your* .sig has vanished.

The above is informational only. I am not telling you to quote, or
if you do quote, where to insert your reply. If you do top-post, at
least put your .sig *after* all quoted text (which is where it belongs).
 

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