DosTips.com

A Forum all about DOS Batch
It is currently 25 May 2017 10:10

All times are UTC-06:00




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Close CMD Window
PostPosted: 03 Jan 2017 08:40 
Offline

Joined: 24 Sep 2015 03:19
Posts: 6
How can I get the Cmd Window to close in the following batch file?


@ECHO OFF

cd "C:\Users\John\AppData\Local\Temp"

start %Temp%
cls

cd "C:\Program Files (x86)\CleanTempDirs"
start "CleanTempDirs.exe"

exit 0

cls


Top
   
 Post subject: Re: Close CMD Window
PostPosted: 03 Jan 2017 08:52 
Offline
Expert

Joined: 22 Jan 2010 18:01
Posts: 2647
Location: Germany
The first parameter of START that is enclosed into quotation marks will be supposed to be the window title. Pass an empty string as first argument
start "" "CleanTempDirs.exe"

Steffen


Top
   
 Post subject: Re: Close CMD Window
PostPosted: 03 Jan 2017 12:52 
Offline

Joined: 21 Mar 2014 08:50
Posts: 401
you don't need to use CD or CLS either:
Code: Select all
@Start "" "%TEMP%"
@Start "" "%ProgramFiles(x86)%\CleanTempDirs\CleanTempDirs.exe"


Top
   
 Post subject: Re: Close CMD Window
PostPosted: 08 Jan 2017 07:50 
Offline

Joined: 24 Sep 2015 03:19
Posts: 6
Thank You


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 4 posts ] 

All times are UTC-06:00


Who is online

Users browsing this forum: Bing [Bot], Hedonist2006 and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited