2
2
I created a batch file to shutdown my PC (Windows 7 Professional).
The batch file is simple, it contains only 1 line:
shutdown -s -t 5
But, sometimes, it does not work.
I use it by using right-click and then "Run as administrator".
Is there any better solution for this?
I need this batch file so I can shutdown my PC while I am connected to it via Remote Desktop. I can turn it on by using wake on lan, but I need a way to completely shut it down remotely!
Thanks :)
What do you mean by "But, sometimes, it does not work."? Are you refereeing to the fact that you have to run it as administrator or is it simply not working from time to time? – None – 2011-05-22T07:51:47.260
1Lol, raise your hand if you tested this on your machine! – None – 2011-05-22T08:05:47.537
No idea what you mean by why it sometimes doesn't work for you, perhaps you have some unsaved documents open with a dialog box showing. Either way check this out also: http://www.instructables.com/id/Make-the-shutdown-icon-on-your-desktop-and-others./ perhaps that will speed up things for you even more.
– None – 2011-05-22T08:25:16.030@David: It certainly can require administrative rights to shut down a machine. It depends on the group policy configuration. Windows Server does not allow non-administrators to shut down. Non-server versions allow it by default, but it can be changed. – Cody Gray – 2011-05-22T08:40:04.563
Why are you looking for a "better" solution than right-clicking on it and running it as administrator? Would you prefer to be told to log out and log back in as an administrator? If you need admin rights to do something, then you need admin rights. There's no workaround unless you own the machine. – Cody Gray – 2011-05-22T08:40:59.803
@Grim: How can that speed things up even more? That's exactly the same thing as he has now. Except, instead of 5 seconds, it waits 10 seconds before initiating a shutdown. That's slower by definition. – Cody Gray – 2011-05-22T08:42:01.583