1.

Solve : Is One Second too quick for "SHUTDOWN -s -t 1"?

Answer» <html><body><p>To shutdown the P.C. I launch a script to run various things that tidy up and remove junk,<br/>and when they have finished it runs<br/> Code: <a>[Select]</a>SHUTDOWN -s -t 10<br/>That causes Windows to :-<br/>close applications and possibly allow me to <a href="https://interviewquestions.tuteehub.com/tag/save-637275" style="font-weight:bold;" target="_blank" title="Click to know more about SAVE">SAVE</a> anything I have forgotten to save;<br/>Possibly allow my intervention if the wretched un-invited cftmon.exe refuses to let go;<br/>probably allow Firefox extensions to synchronise servers with my latest changes;<br/>possible allow my intervention if Firefox cannot close for any reason, e.g. dead Internet.<br/><br/>Then it closes the CMD.EXE window and the SHUTDOWN pop-up appears and gives a 10 second countdown.<br/><br/>WHY should I wait 10 seconds - is it safe to wait only one second ?<br/><br/>Is there something <a href="https://interviewquestions.tuteehub.com/tag/important-1038039" style="font-weight:bold;" target="_blank" title="Click to know more about IMPORTANT">IMPORTANT</a> that may take 10 Seconds to complete in the background ?<br/><br/>Your advice please :-<br/>Can there be something important the needs to finish during the 10 second countdown ?<br/>Would it be safer to allow a longer countdown ?<br/>Is it just as safe to use a 1 Second countdown ?<br/><br/>I know my numbers, I know my 12 times table, watching a countdown does not improve my numeracy ! ! !<br/><br/>I could see the sense of having a ten second countdown  to reconsider and abort,<br/>but I find it does a Magnus Magnusson "I've started, so I'll finish".<br/><br/>It would save 9 seconds of electricity if I cut it down to 1 second,<br/>but I will happily give it another thousand seconds if that would ensure that nothing was damaged by a "premature" shutdown.<br/><br/>I am using Windows XP Home with SP3<br/><br/>Regards<br/>Alan<br/> Quote</p><blockquote>Is it just as safe to use a 1 Second countdown ?</blockquote> <br/>Why wait at all? I customarily shut down using a batch file; I have the delay set to 0. I have been doing this for 6 years in XP, Vista and Windows 7. Windows won't trip the power until it is safe to do so.<br/><br/> Quote from: ALAN_BR<blockquote>Is there something important that may take 10 Seconds to complete in the background ?</blockquote> <br/><br/>The delay chosen by shutdown -s -t <em>N</em> is number of seconds <em>before</em> Windows commences the shutdown procedure. Nothing happens during that time, other than the display of a message to the user. You might as well skip it altogether if you know you want to shut down and you don't need to save any data.<br/><br/><br/><br/>Thank you.<br/><br/>I thought one second should be legitimate, but have often come to grief when I attempt a value of zero  where the code only expects 1 to 255. <br/>Zero Seconds it is then.<br/><br/>I am sure that when I launch my script there "should" be nothing that needs to be saved.<br/>If I reconsider during the script I can immediately close and abort the script.<br/>I just do not see how a final 10 second countdown would allow me to see that a file needed closing, or to tell an application to close its files - and even if I could see, am I not logged out with zero authority once the countdown has started ?<br/>I have never managed to close down/abort the countdown, even the top right close button does nothing.<br/><br/>For many years Windows 98 would give me, every day, a random selection of<br/>BSOD<br/>Lost Clusters<br/>Reprimand for not closing down windows properly<br/>Continuous never ending idle when I told it to shutdown, and I had to pull the plug when the janitor came to lock up the office.<br/><br/>I have not learnt respect for Windows,<br/>but I have learnt to be wary of the grief and misery it imposes without warning ! ! !<br/><br/>I am not a trail blazer, but am happy to follow in your footsteps.<br/>Thank you<br/><br/>Regards<br/>Alan<br/> Quote from: ALAN_BR on July 17, 2010, 11:34:44 AM<blockquote>am I not logged out with zero authority once the countdown has started ?</blockquote> <br/>Quite the reverse. If you open a command prompt, and type <strong>shutdown /?</strong> (This is quite safe, as is just typing <strong>shutdown</strong> on its own, which has the same effect) you will see all the options available. One of these is <strong>shutdown /a</strong> (a is for abort) which immediately terminates any pending shutdown. The help states that the /a switch is only usable during the "time-out period", in this context this is the number of seconds which were specified at the command prompt or in a script with the <strong>-t</strong> option. <br/><br/>Note that in the Windows 2000 and XP help the options are preceded by a dash, (e.g. shutdown -s -t 10) whereas in Vista, Windows 7 etc a slash is used (shutdown /s /t 10) but in fact you can use either format.<br/><br/>Try this - open two command prompt windows and position them side-by-side. In one, type <strong>shutdown /s -t</strong> with some suitably large number e.g. 300 (five minutes). Observe the information box that appears. In the other command window, type <strong>shutdown /a</strong> and see what happens.<br/><br/>I imagine a reason for having a short delay might when you are pretty sure the user will be looking at the screen (e.g. it is you) and you just want to assure them or yourself that the shutdown (or shutdown and restart) is actually going to happen, and a longer one might be where you want to give the user plenty of time to save any work that might be in progress. Remember that shutdowns can be triggered remotely over a network by a system admin, who might for example give everybody an hour to get everything saved and log out. As the help makes clear, the options include the ability to include "reasons for shutdown" information.<br/><br/>.I am sorry that I doubted the "help" from "SHUTDOWN /?" and also your own advice.<br/><br/>My previous experience was that I had zero control once the countdown commenced.<br/><br/>I find that the top right corner still does not close the countdown,<br/>but I now have the ability to launch CMD.EXE and abort the shutdown,<br/>which was not possible last year.<br/><br/>Most system changes I put down to a Patch Tuesday update,<br/>but I think on this occasion it is what I did before SHUTDOWN.<br/><br/>To close down I simply double click a desktop icon (visible because all tasks are <a href="https://interviewquestions.tuteehub.com/tag/closed-919469" style="font-weight:bold;" target="_blank" title="Click to know more about CLOSED">CLOSED</a>).<br/>This icon launched a tidy-up script which concluded by running<br/>CCleaner /AUTO /SHUTDOWN<br/>That purged temporary  and unwanted files automatically without interaction,<br/>and then shut down the computer - 95 times out of 100.<br/>There must have been a race hazard somewhere, and on the failure occasions :-<br/>Task <a href="https://interviewquestions.tuteehub.com/tag/manager-239636" style="font-weight:bold;" target="_blank" title="Click to know more about MANAGER">MANAGER</a> showed that about 5 normal process.exe were missing ; and<br/>repeating the launch of the tidy-up script never succeeded,<br/>some service or process *.exe was no longer available to support CCleaner.<br/><br/>I then created a pure SHUTDOWN script with the single command<br/>SHUTDOWN -s -t 10<br/>I then found that whenever "CCleaner /AUTO /SHUTDOWN" failed<br/>my new shutdown script would always shut down.<br/><br/>I decided that the pop-up screen was totally wrong because :-<br/>1. The top right corner "X" fails to close that window / application as it should,<br/>2. There was no way I could do anything to save the documents as it suggested.<br/><br/>I now realise that criticism 2 is only true if CCleaner has caused 5 services to stop.<br/>Those 5 services did not seem to be <a href="https://interviewquestions.tuteehub.com/tag/required-1185621" style="font-weight:bold;" target="_blank" title="Click to know more about REQUIRED">REQUIRED</a> for me to view files and launch task manager etc etc., and "SHUTDOWN -s -t 10" would still operate.<br/>I now deduce that whilst Windows is closing down because "SHUTDOWN -s -t 10" told it to do so, some further bits of Windows were closed, and it is probably the loss of these bits in addition to the loss of 5 services which has destroyed all my interactive control<br/><br/>My new tidy-up script no longer gives CCleaner the /SHUTDOWN argument,<br/>and concludes with the new line<br/>SHUTDOWN -s -t 1<br/>I like about 1 second to see it go,<br/>and I have never yet thought within 10 seconds of something I forgot to save ! !<br/><br/>Regards<br/>Alan<br/><br/><br/>I am not convinced that programs like CCcleaner are a good idea. Many people think that gee-whiz "registry cleaners" do more harm than good, that they sometimes cause more problems than they prevent.<br/><br/>I do not oppose that view.<br/><br/>For my /AUTO mode I use a very light profile that only zaps stuff that I know is not needed,<br/>and all the flash cookies that always arrive,<br/>and all the Firefox caches in the User profile.<br/>This gives me the benefit that my daughters music and video downloads that filled her caches are erased when she shuts down, leaving more free disc space for me (and vice versa).<br/><br/>I have a more serious manual mode which is more stringent, but I always scrutinise the analysis and use Google to investigate anything that CCleaner has not previously offered to purge, and only commit to a clean after un-checking any items I have doubts about.<br/><br/>The registry was the dreaded end.<br/>I only had a cautious cleanse (with backups) before un-installing something,<br/>and after un-installing when CCLeaner told me of things that had been left behind when something was removed, I believed it and let it purge them.<br/><br/>In my view registry cleaning is no longer the worst bogeyman.<br/>There are new kid's in the block :-<br/>Secure multi-pass erase ; and even worse<br/>Wipe Free Space.<br/><br/>I find it incredible that new users of CCleaner are so eager for a new experience they go for maximum effect, and check all the boxes which for safety are NOT checked on a fresh install.<br/>They even believe that Wipe Free Space will somehow make more free space available for them to use - and then after the disc has been chundering away for a few hours they abort to see what has been happening and find the entire free space has been lost.<br/>Eventually they find the CCleaner forum and users explain what a bad idea it is and point them to documentation, and explain that the free space was overwritten with a monster file that would have been deleted had they allowed CCleaner to finish its work.<br/><br/>You just have to cry - or laugh - take your choice ! !<br/><br/>Having said all that, I trust CCleaner as being much safer than many of the expensive cleaners that the naive grab as today's giveaway on GAOTD and similar sites.<br/><br/>Regards<br/>Alan<br/></body></html>


Discussion

No Comment Found