Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

DOS window remains open


4 replies to this topic

Edmundo

Edmundo
  • Members
  • 26 posts

Posted 14 August 2001 - 15:53

Hi All,

I was wondering if anyone can help with the following, please?

Issue: I have created a .bat file that contains a Username and Password to sign onto a Unix box and copy a file to a location specified by the User, (the Username, Password and Location are entered during the install by the User on a SdShowDlgEdit3 dialog box). However when the .bat file has finished running, I can't close the DOS window.

Question: Is there any function/way of closing this DOS window. I have tried the CloseFile fuction (and also using the words "bye" and "exit" in the .bat file to try to close the window), without much success.

All replies greatly apprecited........

Thanks in advance,


Perotin

Perotin
  • Full Members
  • 407 posts

Posted 14 August 2001 - 17:24

@echo off
...
...
cls

this will do the trick.
See, a dos box will close automatically if there is nocthing left on screen, and "echo off" will prevent "cls" from giving a result message ... so nothing is left to be displayed and the dos box closes.

btw: why two postings ???

(Edited by Perotin at 6:25 pm on Aug. 14, 2001)


Edmundo

Edmundo
  • Members
  • 26 posts

Posted 14 August 2001 - 17:55

Hi Thomas,

Does this "@echo off" have to be included in the .bat file, or is it part of a function within IS??

Thanks for your reply, my apologies for the two posts...... I thought it failed the first time..



Perotin

Perotin
  • Full Members
  • 407 posts

Posted 15 August 2001 - 11:35

Add "@echo off" as first line and "cls" as last line into the batch file, then it will work.