• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 383
  • Last Modified:

show batch file as it runs

I have a batch file that changes to a directory.

Problem is the "command window" does not stay open when I double-click on the batch file in Windows 2000.  It closes as soon a the directory change is made.

If I were already in a DOS window, this wouldn't be a problem, but I want to run the the batch file from the Windows Desktop without having to open a command window and navigate to the desktop folder in DOS.

Please advise.
0
Tom Knowlton
Asked:
Tom Knowlton
  • 7
  • 7
1 Solution
 
RDAdamsCommented:
Does your batch file have the word exit as the last statement?  If yes then remove it.
0
 
Tom KnowltonWeb developerAuthor Commented:
It does not have exit as the last statement.
0
 
RDAdamsCommented:
Are you running this as an Icon on the desktop if yes then right click and choose properties.  Make sure run in normal window is checked.
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Tom KnowltonWeb developerAuthor Commented:
I know what you are talking about, but no such option is available.
0
 
RDAdamsCommented:
Can you post the text of your batch file?
0
 
Tom KnowltonWeb developerAuthor Commented:
Sure.

Here it is:


cd\
cd WINNT
cd MICROS~1.NET
cd FRAMEW~1
cd V10~1.370
gacutil -i c:\tomcsharpcom\tomcsharpcomtest.dll
regasm c:\tomcsharpcom\tomcsharpcomtest.dll


When the last line runs I want the command window to stay open.
0
 
RDAdamsCommented:
Add pause

cd\
cd WINNT
cd MICROS~1.NET
cd FRAMEW~1
cd V10~1.370
gacutil -i c:\tomcsharpcom\tomcsharpcomtest.dll
regasm c:\tomcsharpcom\tomcsharpcomtest.dll
pause
0
 
Tom KnowltonWeb developerAuthor Commented:
Adding pause works, but isn't there a way to just keep the window open with a blinking cursor?

When I press <ENTER> after the pause message, the window still closes.
0
 
RDAdamsCommented:
What directory do you want to be in when it stops

cd c:\tomcsharpcom

Might work.  not 100% sure but give it a go.
0
 
RDAdamsCommented:
cd\
cd WINNT
cd MICROS~1.NET
cd FRAMEW~1
cd V10~1.370
gacutil -i c:\tomcsharpcom\tomcsharpcomtest.dll
regasm c:\tomcsharpcom\tomcsharpcomtest.dll
cd c:\tomcsharpcom

taking out the pause?

0
 
Tom KnowltonWeb developerAuthor Commented:
Does not work, sorry.  :)
0
 
RDAdamsCommented:
I will think about this a little more and see if I can find a workable solution.
0
 
Tom KnowltonWeb developerAuthor Commented:
Okay.

Don't spend too much time :) this is not a big deal.

Thanks again,

Tom
0
 
zafaricCommented:

Put CMD as the last command (instead of PAUSE) and the windows should saty open with blinking cursor.
0
 
Tom KnowltonWeb developerAuthor Commented:
zafaric:

Yiou are correct.  Please pick up some points here:

http://www.experts-exchange.com/Operating_Systems/Win2000/Q_20880347.html
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 7
  • 7
Tackle projects and never again get stuck behind a technical roadblock.
Join Now