PC Review


Reply
Thread Tools Rate Thread

How to close cmd or command window?

 
 
Peter Jensen
Guest
Posts: n/a
 
      18th Feb 2008
X-No-Archive: Yes

I use a network computer at work with Windows XP professional. The
signature files for Outlook are unacceptable. I tried changing them, but
no luck - they are changed back each time Outlook is started. I also
tried changing the .ini file, but it too is changed back.

I devised a work around using a .bat file to remove the read only
attribute from the signature files and overwriting them with acceptable
signature files. The only problem now is the cmd or command (tried both)
window won't close itself. I've tried various combinations with start,
cmd and command, but no luck. How can I get the command window to close
automatically?
 
Reply With Quote
 
 
 
 
Peter Foldes
Guest
Posts: n/a
 
      18th Feb 2008
By default the cmd window will not close automatically by itself. You will need a script to do it. You can try the scripting newsgroup for help on this

--
Peter

Please Reply to Newsgroup for the benefit of others
Requests for assistance by email can not and will not be acknowledged.

"Peter Jensen" <(E-Mail Removed)> wrote in message news:47b9e3de$0$89174$(E-Mail Removed)...
> X-No-Archive: Yes
>
> I use a network computer at work with Windows XP professional. The
> signature files for Outlook are unacceptable. I tried changing them, but
> no luck - they are changed back each time Outlook is started. I also
> tried changing the .ini file, but it too is changed back.
>
> I devised a work around using a .bat file to remove the read only
> attribute from the signature files and overwriting them with acceptable
> signature files. The only problem now is the cmd or command (tried both)
> window won't close itself. I've tried various combinations with start,
> cmd and command, but no luck. How can I get the command window to close
> automatically?

 
Reply With Quote
 
JS
Guest
Posts: n/a
 
      18th Feb 2008
try the 'exit' cmd.

JS

"Peter Jensen" <(E-Mail Removed)> wrote in message
news:47b9e3de$0$89174$(E-Mail Removed)...
> X-No-Archive: Yes
>
> I use a network computer at work with Windows XP professional. The
> signature files for Outlook are unacceptable. I tried changing them, but
> no luck - they are changed back each time Outlook is started. I also tried
> changing the .ini file, but it too is changed back.
>
> I devised a work around using a .bat file to remove the read only
> attribute from the signature files and overwriting them with acceptable
> signature files. The only problem now is the cmd or command (tried both)
> window won't close itself. I've tried various combinations with start, cmd
> and command, but no luck. How can I get the command window to close
> automatically?



 
Reply With Quote
 
GHalleck
Guest
Posts: n/a
 
      18th Feb 2008

Peter Jensen wrote:

> X-No-Archive: Yes
>
> I use a network computer at work with Windows XP professional. The
> signature files for Outlook are unacceptable. I tried changing them, but
> no luck - they are changed back each time Outlook is started. I also
> tried changing the .ini file, but it too is changed back.
>
> I devised a work around using a .bat file to remove the read only
> attribute from the signature files and overwriting them with acceptable
> signature files. The only problem now is the cmd or command (tried both)
> window won't close itself. I've tried various combinations with start,
> cmd and command, but no luck. How can I get the command window to close
> automatically?


Without looking at the actual *.bat file, it is probably missing the
command "exit" (minus the quotes) as its last line. "Exit" should close
the Command Prompt window.
 
Reply With Quote
 
Stan Brown
Guest
Posts: n/a
 
      19th Feb 2008
Mon, 18 Feb 2008 21:09:42 +0100 from Peter Jensen <(E-Mail Removed)>:
> X-No-Archive: Yes


Bwaa-haa-haa.

> I devised a work around using a .bat file to remove the read only
> attribute from the signature files and overwriting them with
> acceptable signature files. The only problem now is the cmd or
> command (tried both) window won't close itself. I've tried various
> combinations with start, cmd and command, but no luck. How can I
> get the command window to close automatically?


The command is EXIT.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com
A: Maybe because some people are too annoyed by top posting.
Q: Why do I not get an answer to my question(s)?
A: Because it messes up the order in which people normally read text.
Q: Why is top posting such a bad thing?
 
Reply With Quote
 
Andy
Guest
Posts: n/a
 
      19th Feb 2008
On Mon, 18 Feb 2008 21:09:42 +0100, Peter Jensen <(E-Mail Removed)>
wrote:

>X-No-Archive: Yes
>
>I use a network computer at work with Windows XP professional. The
>signature files for Outlook are unacceptable. I tried changing them, but
>no luck - they are changed back each time Outlook is started. I also
>tried changing the .ini file, but it too is changed back.
>
>I devised a work around using a .bat file to remove the read only
>attribute from the signature files and overwriting them with acceptable
>signature files. The only problem now is the cmd or command (tried both)
>window won't close itself. I've tried various combinations with start,
>cmd and command, but no luck. How can I get the command window to close
>automatically?


Try typing exit.
 
Reply With Quote
 
Peter Jensen
Guest
Posts: n/a
 
      19th Feb 2008
X-No-Archive: Yes

Peter Foldes wrote:
> By default the cmd window will not close automatically by itself. You will need a script to do it. You can try the scripting newsgroup for help on this
>


Thanks to all who responded. Below is an example batch with exit on the
last line. Wordpad starts, but unfortunately, exit does not close the
cmd window.

@echo off
copy /y c:\temp.tmp c:\temp2.tmp
"C:\Programmer\Windows NT\Tilbehør\wordpad.exe"
exit


Which scripting ng would be recommended to ask for help in?
 
Reply With Quote
 
User
Guest
Posts: n/a
 
      25th Feb 2008

>By default the cmd window will not close automatically by itself. You will need a script to do it. You can try the scripting newsgroup for help on this


Exit did not work. I discovered a solution, in case anyone is
interested. Those who responded may want to take note in the event
this question pops up again.

@echo off
rem some batch command
rem some batch command
start "" "Some Windows Application.exe"
exit


The start command above closes the cmd prompt window when run from the
GUI. However, when run from an open cmd window, the exit is required
to close that window.
 
Reply With Quote
 
New Member
Join Date: Sep 2011
Posts: 1
 
      21st Sep 2011
Thank you, this was a life saver for me. It is a thing of beauty.

Quote:
Originally Posted by User View Post
>By default the cmd window will not close automatically by itself. You will need a script to do it. You can try the scripting newsgroup for help on this

Exit did not work. I discovered a solution, in case anyone is
interested. Those who responded may want to take note in the event
this question pops up again.

@echo off
rem some batch command
rem some batch command
start "" "Some Windows Application.exe"
exit


The start command above closes the cmd prompt window when run from the
GUI. However, when run from an open cmd window, the exit is required
to close that window.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to close command window? Peter Jensen Windows XP Basics 2 2nd Mar 2008 02:02 PM
How to close cmd or command window? Peter Jensen Windows XP New Users 0 18th Feb 2008 08:09 PM
close window command =?Utf-8?B?dGhyZWFkZW1wb3JpdW0=?= Microsoft Frontpage 10 30th May 2007 04:49 PM
close window command =?Utf-8?B?dGhyZWFkZW1wb3JpdW0=?= Microsoft Frontpage 1 13th Aug 2006 04:45 PM
Close a Command window in W2K Bob Microsoft Windows 2000 CMD Promt 0 14th Jul 2003 11:50 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:28 PM.