I can’t speak for them if they’re joking or not but it’s something you can absolutely do. *.bat files (short for “batch”, as in a batch of commands to execute in sequence) are the script files for the Windows command line, and can be executed by double clicking on them
Thanks, I’m familiar with batch files. This just seems like a very bad way to perform a shutdown, especially when running a UI Desktop windowing system. And even if that shutdown command is fully supported from the GUI, I would guess you need to be admin to run it, which means you can run the bat file as admin, so if you can edit the file or modify the env in which it runs (e.g. PATH) it seems like it could be a security problem. And if you don’t need to be root to run the shutdown command, that seems like its own problem. I suppose Windows still has the “run as administrator” from the context menu so maybe that helps.
As it is a simple command you don’t need to be an admin or run as administrator. Listen kids don’t run batch files if you don’t know where they came from or who made them.
Not really. If -f (force) is removed windows will shutdown similar to pressing the shutdown button and will wait for your input regarding open programs. -f is needed to just just “do it” with no hesitation or response from the user.
/t <xxx> Sets the time-out period before shutdown to xxx seconds. The valid range is 0-315360000 (10 years), with a default of 30. If the timeout period is greater than 0, the /f parameter is implied.
Shutdown.exe -r -t 00 -f
Fast , no mucking around with graceful exiting of stuff. Kicks it in the teefs
Some clarification of the command
-r #restart
-s #shutdown
-t 00 #wait 0 seconds
-f #forced
I will just do the update first /s
00?
I know! I wasn’t sure when I posted it, so stuck to memory to be safe.
I reckon I’ve confused the double digits needed for the silly shutdown explanation thing (planned/unplanned, various reasons) instead…
How many seconds you’re prepared to wait for Windows to shutdown.
Yeah, but why 00 and not 00000? Or 0.000?
Because that’s how they do it for Gundams
Probably just habit on their part, it’s no different than just putting 0
deleted by creator
I’ve used a single zero and that works fine too.
Me to
I use that as a bat file so all I have to do is double click it.
and then you can growl menacingly and say ‘don’t make me get the bat, punk’
I don’t use windows.
Not sure if this is a joke or serious.
I can’t speak for them if they’re joking or not but it’s something you can absolutely do. *.bat files (short for “batch”, as in a batch of commands to execute in sequence) are the script files for the Windows command line, and can be executed by double clicking on them
Thanks, I’m familiar with batch files. This just seems like a very bad way to perform a shutdown, especially when running a UI Desktop windowing system. And even if that shutdown command is fully supported from the GUI, I would guess you need to be admin to run it, which means you can run the bat file as admin, so if you can edit the file or modify the env in which it runs (e.g. PATH) it seems like it could be a security problem. And if you don’t need to be root to run the shutdown command, that seems like its own problem. I suppose Windows still has the “run as administrator” from the context menu so maybe that helps.
As it is a simple command you don’t need to be an admin or run as administrator. Listen kids don’t run batch files if you don’t know where they came from or who made them.
If -t is specified -f is assumed and redundant, but also it will try to do graceful l, but with a patience of a cranky toddler
Not really. If -f (force) is removed windows will shutdown similar to pressing the shutdown button and will wait for your input regarding open programs. -f is needed to just just “do it” with no hesitation or response from the user.
Straight from the doc
/t <xxx> Sets the time-out period before shutdown to xxx seconds. The valid range is 0-315360000 (10 years), with a default of 30. If the timeout period is greater than 0, the /f parameter is implied.
Sooo when you use the prompt
You would need the -f since we defined the timeout period as 0. Because:
Yeah fair enough -f -s does the same thing as -t 0?
I don’t trust windows enough, I always input both parameters
Ah nice. I have only used it with -t 0. I’m glad to have learn something today.