Solved

show batch file as it runs

Posted on 2003-11-07
15
375 Views
Last Modified: 2010-04-14
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
Comment
Question by:knowlton
  • 7
  • 7
15 Comments
 
LVL 17

Expert Comment

by:RDAdams
ID: 9703661
Does your batch file have the word exit as the last statement?  If yes then remove it.
0
 
LVL 5

Author Comment

by:knowlton
ID: 9703677
It does not have exit as the last statement.
0
 
LVL 17

Expert Comment

by:RDAdams
ID: 9704013
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
NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

 
LVL 5

Author Comment

by:knowlton
ID: 9704023
I know what you are talking about, but no such option is available.
0
 
LVL 17

Expert Comment

by:RDAdams
ID: 9704040
Can you post the text of your batch file?
0
 
LVL 5

Author Comment

by:knowlton
ID: 9704070
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
 
LVL 17

Accepted Solution

by:
RDAdams earned 250 total points
ID: 9704120
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
 
LVL 5

Author Comment

by:knowlton
ID: 9704159
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
 
LVL 17

Expert Comment

by:RDAdams
ID: 9704176
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
 
LVL 17

Expert Comment

by:RDAdams
ID: 9704179
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
 
LVL 5

Author Comment

by:knowlton
ID: 9704211
Does not work, sorry.  :)
0
 
LVL 17

Expert Comment

by:RDAdams
ID: 9704334
I will think about this a little more and see if I can find a workable solution.
0
 
LVL 5

Author Comment

by:knowlton
ID: 9704345
Okay.

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

Thanks again,

Tom
0
 

Expert Comment

by:zafaric
ID: 10327260

Put CMD as the last command (instead of PAUSE) and the windows should saty open with blinking cursor.
0
 
LVL 5

Author Comment

by:knowlton
ID: 10327392
zafaric:

Yiou are correct.  Please pick up some points here:

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

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question