~~ How to shut down windows XP with an Icon ~~

thedeliman

Member
Feb 13, 2002
103
0
0
Hey guys,

1. Happy Holidays!
2. This is pretty cool... I just bought an IBM thinkpad, and the damn thing doesn't come with a windows key! So...after much searching on google (for 30 minutes), I found a way to make a desktop icon for shutdown options (courtesy of microsoft technet).

a. make a new text document, and open it.
b. paste this in
(new ActiveXObject("Shell.Application")).ShutdownWindows();
and then save.
c. rename it as something.js

that's it!
karl
:cool:
 

azntiger0586

Senior member
Jul 10, 2003
343
0
0
or you can create a new shortcut with the following in the command line:

Windows 95, 98, or Me: C:\windows\rundll.exe user.exe,exitwindows

Windows XP or 2000: SHUTDOWN -s -t 01

Happy holidays to you too!
 

thedeliman

Member
Feb 13, 2002
103
0
0
thx for quick reply, azntiger0586

I take that first post back...on 2nd thought, it's pretty asinine to set up a javascript to ask you what option to take-that defeats the whole purpose of one-touch functionality.

SO-after even more searching (I'm procrastinating like crazy, can't you tell?), here's the mother of all tips - one-icon tips to restart, shut down, and lock workstation in Windows XP professional, AS A POWER USER (you know what a pain in the a** it is to do anything system-wide, but love the security that power user affords):

To shut down
------------------
1. right click on desktop, create new shortcut
2. paste this in

%windir%\System32\runas.exe /user:machine\Administrator /savecred "c:\windows\system32\shutdown.exe -s -t 15 -c "Shutting Down..." "

3. choose some suitable icon (I like the red power button icon in %SystemRoot%\system32\SHELL32.dll)

notes: a) there is no space between System32\runas.exe; b)the -t 15 means 15 seconds, you can change it to whatever time you want; c) the comment in -c "blahblah" has a 127 character maximum

To restart
-------------
1. paste this instead:
%windir%\System32\runas.exe /user:machine\Administrator /savecred "c:\windows\system32\shutdown.exe -r -t 15 -c "Restarting..." "

note: a) no more -s (shutdown) switch, now it's a -r (restart) switch

To lock workstation
-------------------------
1. paste this in:
%windir%\system32\rundll32.exe user32.dll LockWorkStation

now, it's a happy holiday!
:D
:beer: