ceez Posted January 2, 2008 Share Posted January 2, 2008 (edited) hello everyonehere's what I am trying to run:clsecho offECHO INSTALLING ARCHICAD 11"P:\CADD\_CAD Programs\AC 11 Install\AC11 USA 970.exe"ECHO INSTALLING LIBRARY 11 INFORMATIONxcopy /e "P:\CAD Programs\AC 11 Install\ArchiCAD Library 11" "C:\Program Files\Graphisoft\ArchiCAD 11\ArchiCAD Library 11\" /YECHO INSTALLING ARCHICAD 11 HOTFIX"P:\CADD\_CAD Programs\AC 11 Install\AC11 1114\AC11-1114.exe"ECHO INSTALLING ADDONSxcopy "P:\CADD-Ops\Archicad\Add-ons\AC 11 Goodies" "C:\Program Files\Graphisoft\ArchiCAD 11\Add-Ons" /e /yvery simple process....the 1st line installs archicad from network drive (P:\), the 2nd line copies some files to local computer from P:\, the following installs a hotfix exe and the 4th line copies some other files locally.what I need is for it to wait for the 1st command to run and finish before it goes and attempts the 2nd command and so forth. I know about the start /w switch but that is not working for me, it just opens a 2nd DOS box and nothing runs.any ideas?thanks! Edited January 2, 2008 by ceez Link to comment Share on other sites More sharing options...
submix8c Posted January 3, 2008 Share Posted January 3, 2008 I know about the start /w switch but that is not working for me, it just opens a 2nd DOS box and nothing runs.???First, the two "xcopy" lines don't need "start /w", they'll function within the aforementioned ".bat/.cmd" file.As for the two lines with EXE files to be executed, here is a sample for soporific's autopatcher that absolutely waits until execution completes (all over the place!) -START /W "%LOC8%\%PARTH%\%FILES%" %ARGUS%Naturally, there are variables (passed from .bat-to-.bat). - loc8 = starting folder (control .bat files) - parth = next lower folder (where the program is) - files = program to execute - argus = program argumentsSo an example of how this should work for you is -START /WAIT "P:\CADD\_CAD Programs\AC 11 Install\AC11 USA 970.exe"Clueless as to why it shouldn't work (no extra DOS boxes, just executable display stuff)... Link to comment Share on other sites More sharing options...
ceez Posted January 3, 2008 Author Share Posted January 3, 2008 submix for the reply.this is what happens when i add the start /w to the first line:I double click the batch filethe main window comes up which says "INSTALLING ARCHICAD 11"then a 2nd window opens just pointing to the desktop folder of my profile with the blinking cursor "_"the exe (AC11 USA 970.exe) never runs, I close that window and the first window tells me if i want to terminate the job, I say no and then it continues with the other file copies and the hotfix install exe.it's quite odd, but just as you see it, i dont see a problem with it.....weird!!??? i'll revisit the code again later!thanks again!ceez Link to comment Share on other sites More sharing options...
ceez Posted January 3, 2008 Author Share Posted January 3, 2008 btw, submix or anyone else, anyone know the code so if they choose a wrong number or letter that it prompts the user to try again?something like: if %var% not equal to ??? then output "wrong selection" Link to comment Share on other sites More sharing options...
submix8c Posted January 3, 2008 Share Posted January 3, 2008 (edited) If you don't see this as a waste of download, go to -http://www.msfn.org/board/index.php?showtopic=80800and download/install it (AutoPatcher)... in the "CODE" folder are a lot of ".BAT" modules you could use of examples of "how-to's". Yes, it installs anyway on a non-Win98SE OS (just won't run; it detects wrong OS). Copy the folder and sub-folders to elsewhere, then uninstall it (ADD/REMOVE; you got examples now).WOOHOO! DOS-oriented scripts!!!HTHEdit - Forgot... also save the ".BAT" files in the "root" directory. Hope you have time to "read" all the code and understand it (for your purposes anyway). Could be you need to "CALL" a sub-BAT/CMD then do a START of the associated EXE within it... don't quite remember. Ennyhoo, just get it for great examples. ComputerHope also has a lot of info on everything you see in the "scripts". Edited January 3, 2008 by submix8c Link to comment Share on other sites More sharing options...
ceez Posted January 3, 2008 Author Share Posted January 3, 2008 hmmmm....so 264 megs of batch file examples?!?! i dont get it yet but i'll download it.thanks for the infoceez Link to comment Share on other sites More sharing options...
submix8c Posted January 3, 2008 Share Posted January 3, 2008 (edited) 264 megs of batch file examples?!?!Ok... I did say you only needed the BAT files as examples, so if you want to "cancel" the download, attached are the BAT files in question... remember that variables point to different other folders/files within the package.just_the_BAT.zip Edited January 3, 2008 by submix8c Link to comment Share on other sites More sharing options...
aadipa Posted January 3, 2008 Share Posted January 3, 2008 btw, submix or anyone else, anyone know the code so if they choose a wrong number or letter that it prompts the user to try again?something like: if %var% not equal to ??? then output "wrong selection"choice command will help in it.check for its syntax on how you can use it with if errorlevel = ... command for your use. Link to comment Share on other sites More sharing options...
spacesurfer Posted January 3, 2008 Share Posted January 3, 2008 (edited) So an example of how this should work for you is -START /WAIT "P:\CADD\_CAD Programs\AC 11 Install\AC11 USA 970.exe"The above will not work because the syntax in the first quotes is the Title of the DOS Windows. You need to change it to:START "Installing Whatever" /wait "P:\CADD\_CAD Programs\AC 11 Install\AC11 USA 970.exe"The syntax is:start "Title of Windows" /wait "program to execute.exe"This will solve the problem you mentioned in post #3 about two windows. Edited January 3, 2008 by spacesurfer Link to comment Share on other sites More sharing options...
submix8c Posted January 3, 2008 Share Posted January 3, 2008 (edited) @spacesurfer -WOOHOO! You are correct... The problem had lain in the usage of OLD style .BAT execution; this is obviously for 2K/XP/2Kn new-style .CMD execution. Yep, there's a difference (I had forgotten about). It works exactly like that. I assume that any executable parameters (following the .EXE, outside of quotes) will be passed (eg for "quiet" installs).Ennyhoo, the examples given in the Win9x attachment still apply (kind of). Best to check the differences if you want to create a fancy script, since changes have been made to how they work.BTW, the "title" appears to be irrelevant in this case, just a requirement of the syntax used (it doesn't do anything in this case - only relevant if starting another CMD/BAT window, not an EXE/COM)... Edited January 3, 2008 by submix8c Link to comment Share on other sites More sharing options...
spacesurfer Posted January 3, 2008 Share Posted January 3, 2008 You are right about the irrelevancy of the title - it does not display, yet it's required to pass the parameters correctly! Link to comment Share on other sites More sharing options...
ceez Posted January 7, 2008 Author Share Posted January 7, 2008 @everyone, thank you very much for your assistance, it's working PERFECTLY now!@submix, thanks for the zip file with the batch files, I just clicked and figured it woudl be somwhere in that huge download...but you did save me some bandwith! @spacesurfer, thank you for the code syntax, I did not know about the " " (quotes).@aadipa, I did find some info on the choices command but it seems to be a pre XP command. thanks!thanks again!ceez Link to comment Share on other sites More sharing options...
PC_LOAD_LETTER Posted January 7, 2008 Share Posted January 7, 2008 if you need to pause for ~4 seconds you can also useecho pausing for 4 seconds before continuing...ping 127.0.0.1 > nulecho resuming...orecho pausing for 10 seconds before continuing...ping 127.0.0.1 /n 10 > nulecho resuming...i have that in one batch for a plugin installer that doesnt close immediately after install and will error if i try to access it immediatly Link to comment Share on other sites More sharing options...
ceez Posted January 7, 2008 Author Share Posted January 7, 2008 so just add:/n 10 > nulto the end of any line? I am assuming you can use any other number of seconds right?thanks! Link to comment Share on other sites More sharing options...
submix8c Posted January 7, 2008 Share Posted January 7, 2008 (edited) No... the "ping" has a "built-in wait time" that you can specify (in the second example "10 seconds"). The " > nul " only sends the "console output" to never-never land... Different ways to "stall", that was one of them...Yes... in seconds, whatever value you want... Edited January 7, 2008 by submix8c 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