Solved

show batch file as it runs

Posted on 2003-11-07
15
373 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
 
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
A Short Story about the Best File Recovery Software – Acronis True Image 2017
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

743 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now