If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Rate Thread | Display Modes |
#1
|
|||
|
|||
shutdown /s /t 0
If I run this from a batch file, it opens up a cmd window and just keeps
running in a loop and nothing happens. Although running it from Win+R it works fine. What am I missing from the batch file? -- Bill Dell Latitude Slate Tablet 128GB SSD ('12 era) - Thunderbird v12 Intel Atom Z670 1.5GHz - 2GB - Windows 8 Professional |
Ads |
#2
|
|||
|
|||
shutdown /s /t 0
BillW50 wrote:
If I run this from a batch file, it opens up a cmd window and just keeps running in a loop and nothing happens. Although running it from Win+R it works fine. What am I missing from the batch file? If your batch is left running you might need to "force" the shutdown, either try /t 1 instead of /t 0 which implies force, or add /f specifically |
#3
|
|||
|
|||
shutdown /s /t 0
On 2/10/2013 3:25 PM, Andy Burns wrote:
BillW50 wrote: If I run this from a batch file, it opens up a cmd window and just keeps running in a loop and nothing happens. Although running it from Win+R it works fine. What am I missing from the batch file? If your batch is left running you might need to "force" the shutdown, either try /t 1 instead of /t 0 which implies force, or add /f specifically Thanks Andy... I'll give that a shot. ;-) -- Bill Gateway M465e ('06 era) - Thunderbird v12 Centrino Core2 Duo T7400 2.16 GHz - 4GB - Windows 8 Pro w/Media Center |
#4
|
|||
|
|||
shutdown /s /t 0
"BillW50" wrote in message
... If I run this from a batch file, it opens up a cmd window and just keeps running in a loop and nothing happens. Although running it from Win+R it works fine. What am I missing from the batch file? Is your batch file called shutdown.bat? If so, then that is what is being run when you simply say "shutdown". Change the command line inside the batch file to specify "shutdown.exe" and the batch will call the executable. |
#5
|
|||
|
|||
shutdown /s /t 0
On 2/10/2013 8:19 PM, Seth wrote:
"BillW50" wrote in message ... If I run this from a batch file, it opens up a cmd window and just keeps running in a loop and nothing happens. Although running it from Win+R it works fine. What am I missing from the batch file? Is your batch file called shutdown.bat? If so, then that is what is being run when you simply say "shutdown". Change the command line inside the batch file to specify "shutdown.exe" and the batch will call the executable. Oh man! I read your post and I thought I didn't really name a batch file the very same name as a valid command, did I? So I checked... DOH! Many thanks! -- Bill Gateway M465e ('06 era) - Thunderbird v12.0.1 Centrino Core2 Duo T5600 1.83GHz - 4GB - Windows XP SP2 |
#6
|
|||
|
|||
shutdown /s /t 0
"BillW50" wrote in message ... On 2/10/2013 8:19 PM, Seth wrote: "BillW50" wrote in message ... If I run this from a batch file, it opens up a cmd window and just keeps running in a loop and nothing happens. Although running it from Win+R it works fine. What am I missing from the batch file? Is your batch file called shutdown.bat? If so, then that is what is being run when you simply say "shutdown". Change the command line inside the batch file to specify "shutdown.exe" and the batch will call the executable. Oh man! I read your post and I thought I didn't really name a batch file the very same name as a valid command, did I? So I checked... DOH! Sometimes it's the silly things. For example, right now one of my code-jockeys is writing a Windows app to monitor a folder for new PDFs, when one appears, activate the Windows print dialog and once complete, delete the PDF (printing solution for users of MED-V). 3 of the offshore QA guys reported that when the select printer dialog comes up the options to select what page are grayed out (say you only want to print the first page, just pages 3-5, etc...). Developer looked over his code and options for a while and couldn't figure out where he may have disabled that. Asked him if either he or the QA guys had dropped a PDF of more than 1 page in the watch folder. Sure enough, dropped a multi page PDF in there and the options magically re-appeared... |
#7
|
|||
|
|||
shutdown /s /t 0
On Tue, 12 Feb 2013 08:28:05 -0500, Seth wrote:
"BillW50" wrote in message ... On 2/10/2013 8:19 PM, Seth wrote: "BillW50" wrote in message ... If I run this from a batch file, it opens up a cmd window and just keeps running in a loop and nothing happens. Although running it from Win+R it works fine. What am I missing from the batch file? Is your batch file called shutdown.bat? If so, then that is what is being run when you simply say "shutdown". Change the command line inside the batch file to specify "shutdown.exe" and the batch will call the executable. Oh man! I read your post and I thought I didn't really name a batch file the very same name as a valid command, did I? So I checked... DOH! Sometimes it's the silly things. For example, right now one of my code-jockeys is writing a Windows app to monitor a folder for new PDFs, when one appears, activate the Windows print dialog and once complete, delete the PDF (printing solution for users of MED-V). 3 of the offshore QA guys reported that when the select printer dialog comes up the options to select what page are grayed out (say you only want to print the first page, just pages 3-5, etc...). Developer looked over his code and options for a while and couldn't figure out where he may have disabled that. Asked him if either he or the QA guys had dropped a PDF of more than 1 page in the watch folder. Sure enough, dropped a multi page PDF in there and the options magically re-appeared... Somehow that's funnier (to me) than Bill's slip. But I admire you for catching Bill's error. Little things like that are totally obvious, but *only* in retrospect, and they are real killers. -- Gene E. Bloch (Stumbling Bloch) |
Thread Tools | |
Display Modes | Rate This Thread |
|
|