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,567 of 68,980   
   JJ to All   
   Re: Batch to leave open CMD window after   
   08 Jun 20 18:54:54   
   
   From: jj4public@vfemail.net   
      
   On Sun, 7 Jun 2020 15:07:36 -0400, Zaidy036 wrote:   
   > Windows 10 Pro 64 bit.   
   >   
   > Wanted: Desktop Shortcut to launch a batch which leaves an Administrator   
   > CMD window open as if ECHO Off and CLS have already been run. Shortcut   
   > is easy and leaving a window open with "CMD /K" works but my other   
   > attempts always require a "ECHO OFF & CLS" afterwards.   
   >   
   > Does anyone have a solution for this? I use this frequently and want   
   > something simpler than PhraseExpress providing a shortcut for it.   
      
   That should be:   
      
     cmd.exe /k echo off & "c:\my progs\my batch.bat"   
      
   `cls` command is not required because the /K switch won't make CMD displays   
   the program name and version, so the console window is always blank from the   
   start.   
      
   Keep in mind though, the effect of the `echo off` before the batch file is   
   executed, will still in effect after the batch file ends. So, there will be   
   no `C:\>` prompt when the CMD is ready to receive user command line input.   
   If you want the prompt to appear again, use this.   
      
     cmd.exe /k echo off & "c:\my progs\my batch.bat" & echo on   
      
   --- 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