L1qu1D Posted July 10, 2009 Posted July 10, 2009 Ya, I just got tired of clicking a whole bunch just to shutdown my computer so I created a .bat file to shut my computer down faster with a keyboard shortcut! Now, you can't add a keyboard shortcut to a .bat file. So how you get "Around it?" Well take the .bat file and put it in My Documents then right click and make a shortcut to the file and drag it onto your desktop. Then right click that file and create a keyboard shortcut. The shortcut I use is Ctrl+Alt+S to shut down the computer. You have to have the .bat shortcut on your desktop for this to work, how ever if you don't like it there you can always right click and select the file to be "Hidden." To create the .bat file just open notepad, copy and paste the commands below into notepad. Then save as shutdown.bat *MAKE SURE YOU SELECT "SAVE AS TYPE" TO ALL!* shutdown.exe -s -f -t 03 -c "Haha L1qu1D Shutdown! See Ya Later!" For you that don't understand the commands I will explain for you... shutdown.exe -The command to call the shutdown program -s - To tell it to shutdown and halt -f -To force all the open programs (if any) to close -t -How much time before it shuts down -c -Used to leave a comment about the shutdown or why you shut it down. ---If you know of a better way or see something wrong please comment--- Hope this makes your Windows experience better lol! -L1qu1D Quote
taiyed14 Posted July 10, 2009 Posted July 10, 2009 i use the power cable to shut down my computer Quote
L1qu1D Posted July 11, 2009 Author Posted July 11, 2009 i use the power cable to shut down my computer Lol now thats a smart way to shut down ur Windows machine! ;) ERROR: DATA LOSS! lmao Quote
WhollyMindless Posted July 11, 2009 Posted July 11, 2009 It's a windows box. It turns itself off every tuesday. Quote
SomethingToChatWith Posted July 11, 2009 Posted July 11, 2009 Every 3 Tuesdays if its up to date :P Quote
Deveant Posted July 11, 2009 Posted July 11, 2009 This isnt really a safe way of shutting down your PC. Your sending kill now commands to applications, which can cause data lose, not just programs out the front, but programs that controll your OS, So you might as well just pull ye'ol black cable from the wall, quicker and the odds are the same. Why would you want to shutdown any quicker? (i dont turn off my PC, though it power cycles every saturday morning) Quote
SomethingToChatWith Posted July 12, 2009 Posted July 12, 2009 How are you really shutting down your PC quicker anyhow? I notice you've got a 3 second delay in there for a silly message. You're best taking out the forcing everything to quit and limiting the time before it tries to shutdown to 0. Quote
i.have.rewt Posted July 12, 2009 Posted July 12, 2009 While it's a good idea to help yourself get experience with automation and scripts, this "automation" isn't as ideal because it's like SomethingToChatWith said.. it's not saving you any time at all. HOWEVER, shutdown and reboot scripts can be used in a networking environment for automating such things. I have experience with them back in high school we needed to power down the library computers at the end of each day to save power.. there were around 100 computers to shutdown and you can imagine that would suck ass. Who the hell wants to walk around to all of them going through the shutdown sequence? So we automated it from the NT server station. In that environment we didn't need to worry about saving anyone's files since we made sure beforehand that no one was left in the lab. Quote
L1qu1D Posted July 12, 2009 Author Posted July 12, 2009 Just to clarify, the -f command can cause some data loss but is highly unlikely, except for open programs at the time of shutdown. 2nd, this .bat file is not to make your computer shutdown faster because of the script! The REAL reason to shut the computer down faster is because the Keyboard shortcuts. So, let me ask you this... Would you rather click start, then shutdown, then okay? Or be able to push ctrl, alt, s and forget about closing all your windows and have it shutdown? That is the process in which I am talking about. 3rd, I let people know about what the commands do, hence, you can modify it anyway you want. The 3 second delay is the way "I" like it. Feel free to change it for your own taste. Maybe if you would have read and tried it out you would have understood it... For thos of you who don't shutdown your computer then, ya this has nothing to do with you. However I do, which is why I made this .bat file. Quote
misfitsman805 Posted July 12, 2009 Posted July 12, 2009 Wouldn't pressing the power button and having it shutdown be a lot faster then that script or any other one anyways? Quote
L1qu1D Posted July 12, 2009 Author Posted July 12, 2009 Wouldn't pressing the power button and having it shutdown be a lot faster then that script or any other one anyways? Lol, true, but some people has the power button set for standby or hibernate. :P Quote
digip Posted July 12, 2009 Posted July 12, 2009 Lol, true, but some people has the power button set for standby or hibernate. :P If you can take the time to set up the script, then you can take the time to set up the power button to shutdown instead of standby or hybernate. About the only thing this is good or it scheduled reboots and shutdowns, but as an admin, you can send these commands remotely to any machine in the domain anyway from a central server, and even have it automated on a schedule. Quote
SomethingToChatWith Posted July 12, 2009 Posted July 12, 2009 ...and forget about closing all your windows and have it shutdown? That is the process in which I am talking about.... ...Maybe if you would have read and tried it out you would have understood it... Ok, the force option isnt needed to close your apps. In addition you may shutdown your computer without closing your apps, granted any hanging apps would stop it until you ended it. Like you I was commenting, so maybe if you tried it you would understand it. Quote
beaver Posted July 23, 2009 Posted July 23, 2009 I don't shut my computer down, my mum comes by and turns it off at the wall, it's very convenient, but annoying, since I usually have it left on compiling maps and curing cancer. Also you could just press the power button on the front, or get an extremely annoying keyboard with shutdown and sleep buttons on it. Generally us people have show hidden files set to on, so hiding doesn't do anything except make it slightly transparent. Quote
PoZHx Posted August 28, 2009 Posted August 28, 2009 @Liqu1d Don't want to discredit you or anything but this is programming section not batch script section Faster way which i know of to close your computer down in programming would be: KeBugCheck(POWER_FAILURE_SIMULATE); programming HAL which is in Ring0 this will instantly shutdown your computer won't produce any error BSOD but could cause data errors If you really want to learn how to close down your computer faster you will need to learn some HAL But why would you want to shutdown your computer fast as possible? If you want some actual programming shutting down a computer which is safe use: ExitWindowsEx API Syntax from MSDN: http://msdn.microsoft.com/en-us/library/aa...28VS.85%29.aspx Quote
G-Stress Posted September 6, 2009 Posted September 6, 2009 I was gonna post a thread similar to this just haven't gotten around to it. What I'd like to see is a .bat file or some sort of command to that can be executed on 1 computer and then shutdown every pc on the network. For example I run about 6 PC's consistently and I'd like to be able to execute one command and have it shutdown all 6 pc's properly. I know there are alot of tools out there that do this, but haven't found one that will allow a group of machines to be shut down at once. I mainly thought about this for thunderstorms I always shutdown the network when it storms. Just a hassle to have to goto every machine to do it. Quote
PoZHx Posted September 7, 2009 Posted September 7, 2009 I was gonna post a thread similar to this just haven't gotten around to it. What I'd like to see is a .bat file or some sort of command to that can be executed on 1 computer and then shutdown every pc on the network. For example I run about 6 PC's consistently and I'd like to be able to execute one command and have it shutdown all 6 pc's properly. I know there are alot of tools out there that do this, but haven't found one that will allow a group of machines to be shut down at once. I mainly thought about this for thunderstorms I always shutdown the network when it storms. Just a hassle to have to goto every machine to do it. http://support.microsoft.com/kb/317371 Or code up your own application to shutdown them Quote
MRGRIM Posted September 30, 2009 Posted September 30, 2009 I was gonna post a thread similar to this just haven't gotten around to it. What I'd like to see is a .bat file or some sort of command to that can be executed on 1 computer and then shutdown every pc on the network. For example I run about 6 PC's consistently and I'd like to be able to execute one command and have it shutdown all 6 pc's properly. I know there are alot of tools out there that do this, but haven't found one that will allow a group of machines to be shut down at once. I mainly thought about this for thunderstorms I always shutdown the network when it storms. Just a hassle to have to goto every machine to do it. Provided you know the hostnames and the user you are currently logged in as has Admin rights you could use Shutdown.exe /m \\hostname /s /f I belive the syntax is correct. If you don't have admin rights, I guess you could knock something up using telnet? Quote
Murkis Posted October 7, 2009 Posted October 7, 2009 I was gonna post a thread similar to this just haven't gotten around to it. What I'd like to see is a .bat file or some sort of command to that can be executed on 1 computer and then shutdown every pc on the network. For example I run about 6 PC's consistently and I'd like to be able to execute one command and have it shutdown all 6 pc's properly. I know there are alot of tools out there that do this, but haven't found one that will allow a group of machines to be shut down at once. I mainly thought about this for thunderstorms I always shutdown the network when it storms. Just a hassle to have to goto every machine to do it. Googled around abit n found this at a forum. How to shutdown a Win2000/XP remotely To remote shutdown windows 2000/XP, 1) run MMC>Computer Management; right-click Computer Management (local)>connect to another computer; select the remote computer; right-click Computer Management (remote computer)>Properties>Advanced>startup & Recovery>shutdown. 2) use command shutdown \\computername. Note: The specified computer may not shut down when you use the Shutdown.exe tool to shut it down. This behavior can occur if the Unlock Computer dialog box appears on the desktop, or if the computer is locked. 3) Other remote access software such as Terminal Service, pcAnywhere, Netmeeting, VNC and Telnet. 4) Use Shutgui.exe from NT Resource Kit Hope it helps yah ;D Quote
Dark_Aaron Posted December 23, 2009 Posted December 23, 2009 I have a better way (and prettier).. Do whatever it takes to get a BSOD... Quote
theSuperman Posted January 5, 2010 Posted January 5, 2010 Too bad the server is not Unix, because the command would be so much easier: init 0 :) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.