home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.msdos.batch.nt      Fun with Windows NT batch files      68,980 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 67,451 of 68,980   
   Tom Del Rosso to All   
   Batch repeats if it has a shutdown comma   
   31 Aug 19 03:58:09   
   
   From: fizzbintuesday@that-google-mail-domain.com   
      
   Looking at someone else's system, Win7 Pro.  He has an update for Skype   
   KB3061064 that keeps failing (with error 80242007) so every time he   
   shuts down it hangs trying to update again.  No other updates seem to be   
   pending because it says "update 1 of 1" but "check for updates" fails   
   immediately with 8024402F.   
      
   I don't know about skype beyond the basic install that I have, but the   
   KB implies that this update is for a corporate server so I don't know   
   why it's trying to apply it to a stand-alone PC that also seems to have   
   only a basic install.   
      
   So while I'm trying to figure out how to make the update complete, or   
   just stop, I put a cmd file on his desktop with   
      
   shutdown /s /t 10   
      
   so at least for now he can shutdown without the update re-trying.   
      
   That's where the weirdness begins.  It just echoes the line repeatedly   
   without actually running it.   
      
   >shutdown /s /t 10   
   >shutdown /s /t 10   
   >shutdown /s /t 10   
   >shutdown /s /t 10....   
      
   And shutdown /a in another window says "no shutdown was in progress."   
      
   So I put other commands first like   
      
   dir c:\   
   echo A   
   shutdown /s /t 10   
      
   which outputs normally for the first 2 lines, but the last line only   
   echoes, then it all repeats.   
      
   >dir c:\   
    Volume in drive C is OS   
   [.....................]   
                 16 Dir(s)   89,608,846,336 bytes free   
   >echo A   
   A   
   >shutdown /s /t 10   
      
      
   >dir c:\   
    Volume in drive C is OS   
   [.....................]   
                 16 Dir(s)   89,608,846,336 bytes free   
   >echo A   
   A   
   >shutdown /s /t 10   
      
      
   >dir c:\   
    Volume in drive C is OS   
   [.....................]   
                 16 Dir(s)   89,608,846,336 bytes free   
   >echo A   
   A   
   >shutdown /s /t 10   
      
      
   So it actually executes other commands repeatedly, but shutdown doesn't   
   execute.   
      
   And DIR by itself just runs once.  Having shutdown on the next line   
   makes it repeat.   
      
   Other internal and external commands also execute but shutdown always   
   acts like GOTO :TOP even though there is no label to go to.   
      
   More weirdness...   
      
   If I make a new cmd file (not even a modified copy, but a new file   
   created by a new instance of notepad) then commands (other than   
   shutdown) work normally, but if the file has a shutdown command with   
   different parameters like   
      
   dir c:\   
   shutdown /r /t 15   
      
   then it still only echoes the parameters of the first file, just echoing   
   the line.   
      
   >shutdown /s /t 10   
   >shutdown /s /t 10   
   >shutdown /s /t 10   
   >shutdown /s /t 10....   
      
   And if the first file is changed to a number like 40 then running the   
   second cmd file outputs   
      
   >shutdown /s /t 40   
   >shutdown /s /t 40   
   >shutdown /s /t 40   
   >shutdown /s /t 40....   
      
      
   --   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca