aclandor Posted September 27, 2007 Share Posted September 27, 2007 This is a part of a scritp .CMD:copy d:\files\setup.exe c:\temp\setup.exestart c:\temp\setup.exe /s(I need a delay here)del c:\temp\setup.exereg 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 Link to comment Share on other sites More sharing options...
Deman Posted September 27, 2007 Share Posted September 27, 2007 (edited) You could try thisping 127.0.0.1 /n 2 > NULWhere 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 Edited September 27, 2007 by Deman Link to comment Share on other sites More sharing options...
aclandor Posted September 27, 2007 Author Share Posted September 27, 2007 You could try thisping 127.0.0.1 /n 2 > NULWhere 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 finishedOh yeah!!!! Perfect!!!! Thanks!!!! Link to comment Share on other sites More sharing options...
Yzöwl Posted September 27, 2007 Share Posted September 27, 2007 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 Commandcopy d:\files\setup.exe c:\tempstart "" /wait c:\temp\setup.exe /sdel c:\temp\setup.exereg delete (the path here...)Using /wait will mean that the delete command will not be invoked until the setup has completed. Link to comment Share on other sites More sharing options...
Sonic Posted September 27, 2007 Share Posted September 27, 2007 Yzöwl is right, even start /w "" "c:\my program\setup.exe" /s will okay Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now