MSFN Forum: Sleep command don't work - MSFN Forum

Jump to content



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

Sleep command don't work And I need a delay time between 2 comands Rate Topic: -----

#1 User is offline   aclandor 

  • Group: Members
  • Posts: 4
  • Joined: 17-September 07

  Posted 27 September 2007 - 02:12 PM

This is a part of a scritp .CMD:

copy d:\files\setup.exe c:\temp\setup.exe

start c:\temp\setup.exe /s

(I need a delay here)

del c:\temp\setup.exe

reg delete (the path here...)

========

I need this delay because when it goes to delete the setup.exe in the temp dir and the reg of the software, the setup is in execution! The command lines don't find the path of the reg because he is not created in the moment (the seput is running).

And the sleep command don't run: sleep' is not recognized as an internal or external command.operable program or batch file

:wacko: :blink:


#2 User is offline   Deman 

  • Junior
  • Pip
  • Group: Members
  • Posts: 58
  • Joined: 12-December 06

Posted 27 September 2007 - 02:20 PM

You could try this
ping 127.0.0.1 /n 2 > NUL

Where 2 = a number of times to ping. Bit cheap but it works :)

Alternatively you could remove the start from "start c:\temp\setup.exe /s"
That way the batch script won't continue until setup.exe has finished

This post has been edited by Deman: 27 September 2007 - 02:25 PM


#3 User is offline   aclandor 

  • Group: Members
  • Posts: 4
  • Joined: 17-September 07

  Posted 27 September 2007 - 02:50 PM

View PostDeman, on Sep 27 2007, 05:20 PM, said:

You could try this
ping 127.0.0.1 /n 2 > NUL

Where 2 = a number of times to ping. Bit cheap but it works :)

Alternatively you could remove the start from "start c:\temp\setup.exe /s"
That way the batch script won't continue until setup.exe has finished



Oh yeah!!!! Perfect!!!! :thumbup :rolleyes: :lol: :w00t: Thanks!!!!

#4 User is offline   Yzöwl 

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

Posted 27 September 2007 - 02:58 PM

View Postaclandor, on Sep 27 2007, 09:12 PM, said:

I need this delay because when it goes to delete the setup.exe in the temp dir and the reg of the software, the setup is in execution!
Have you thought about changing the script to use an appropriate switch with the Start Command
copy d:\files\setup.exe c:\temp
start "" /wait c:\temp\setup.exe /s
del c:\temp\setup.exe
reg delete (the path here...)
Using /wait will mean that the delete command will not be invoked until the setup has completed.

#5 User is offline   Sonic 

  • Sonic
  • Group: Patrons
  • Posts: 1,600
  • Joined: 04-December 03

Posted 27 September 2007 - 05:19 PM

Yzöwl is right, even
start /w "" "c:\my program\setup.exe" /s
will okay ;)

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