MSFN Forum: Batch file stops before finishing? Help... - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Batch file stops before finishing? Help... Rate Topic: -----

#1 User is offline   owoods 

  • Newbie
  • Group: Members
  • Posts: 19
  • Joined: 16-January 05

Posted 20 January 2005 - 03:08 PM

Hi

OK, having done 23 installs so far, the "cleanup" batch file always kills itself just before it finishes. Here is my code:

ECHO.
ECHO Removing Program Installation Directories
ECHO Please wait...
rmdir %systemdrive%\Install /S/Q

--------------------------

ECHO.
ECHO Removing Temporary Driver Installation Directories
ECHO Please wait...
rmdir %systemdrive%\Drivers /S/Q


It always kills itself where i have put the -------

Anyone ideas?

TIA
Oli


#2 User is offline   bucketbuster 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 649
  • Joined: 16-November 03

Posted 20 January 2005 - 03:49 PM

owoods, on Jan 20 2005, 03:08 PM, said:

Hi

OK, having done 23 installs so far, the "cleanup" batch file always kills itself just before it finishes.  Here is my code:

ECHO.
ECHO Removing Program Installation Directories
ECHO Please wait...
rmdir %systemdrive%\Install /S/Q

--------------------------

ECHO.
ECHO Removing Temporary Driver Installation Directories
ECHO Please wait...
rmdir %systemdrive%\Drivers /S/Q


It always kills itself where i have put the -------

Anyone ideas?

TIA
Oli

Put ECHO in front of the ---------------------------- and it should work.

#3 User is offline   owoods 

  • Newbie
  • Group: Members
  • Posts: 19
  • Joined: 16-January 05

Posted 20 January 2005 - 04:08 PM

The ----------------- doesnt exist in the actual file - put it there as an indicator of where the file was breaking.

Any ideas?
TIA
Oli

#4 User is offline   Yzöwl 

  • Wise Owl
  • Group: Super Moderator
  • Posts: 4,195
  • Joined: 13-October 04
  • OS:Windows 7 x64

Posted 20 January 2005 - 04:13 PM

You are deleting the folder with the batch in, before it has finished running.
Switch them around and make sure that the last command is the one deleting the folder in which your running batch resides.

#5 User is offline   owoods 

  • Newbie
  • Group: Members
  • Posts: 19
  • Joined: 16-January 05

Posted 20 January 2005 - 04:22 PM

@ Yzowl

You make me feel so stupid! Thanks!

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy