| Forum Home | ||||
| Press F1 | ||||
| Thread ID: 38857 | 2003-10-20 13:06:00 | Batch Files (Programs) | Brain_Cell_Anon (261) | Press F1 |
| Post ID | Timestamp | Content | User | ||
| 185189 | 2003-10-20 13:06:00 | Hmm! I'm trying to get half a dozen apps. running one after another. Any body got any clues? ?:| Ieg By that I mean I 'run' (??) the batch file and it starts app. no. one. When that app. 'self closes' the batch file starts app. no. two. When app. two 'self finishes' the batch file starts app. three and so on, and so on!! :-) I've put a post (here somewhere!) about doing it using Visual Basic v6 (if any one can help out there??? :_| ) Otherwise I have wondered about Batch Files, but failed miserably at trying to understand the darn things @ polytech. :-( So willing to try most things (as I do) any one got any ideas? :D Regards, the Cell PS I know there must be away as there are programs I use that call on other executables during there usage! (er, I think :8} ) |
Brain_Cell_Anon (261) | ||
| 185190 | 2003-10-20 13:25:00 | yea man i got the answer but i'd have to be at work to give you the .bat file at work a colleague made a maintenance program so it will run Defrag then NotonsAV then ad-aware... he had a fer problem on the win98 PCs because they would want a [OK] to continue defrag but on win2K he set it so that it worked smoothly i'll repost at about 3-4PM because i start work at 3:30 i was wondering what programs you are trying to ran |
sc0ut (2899) | ||
| 185191 | 2003-10-21 04:08:00 | here is the content of it sorry i'm in a hurry and i cant filter out what you want it is easy enough to figure it out -------- . bat--------- color 07 @ECHO OFF title Shop 1 Service Program! Created by Phil ECHO PHIL RULEZ SHOP1 SERVICE regedit /q /s \\pc94\Service\autoadmin . reg copy "\\pc94\SERVICE\Start Menu\Programs\Startup\* . *" "C:\Documents and Settings\All Users\Start Menu\Programs\Startup" mkdir "C:\Documents and Settings\vadal\Start Menu\Applications" copy "\\pc94\Service\Maintenance . lnk" "C:\Documents and Settings\vadal\Start Menu\Applications" copy "\\pc94\Service\Dropbox . lnk" "C:\Documents and Settings\vadal\Start Menu" copy "\\pc94\Service\Dropbox . lnk" "C:\Documents and Settings\Vadal\Desktop" copy "\\pc94\Service\Maintenance . lnk" "C:\Documents and Settings\games\Start Menu\Applications" mkdir "C:\Documents and Settings\administrator\Start Menu\Applications\" copy "\\pc94\Service\Maintenance . lnk" "C:\Documents and Settings\administrator\Start Menu\Applications" cd "C:\Program Files\" mkdir Lavasoft cd lavasoft mkdir "Ad-aware 6" cd Ad-aware 6 copy \\pc94\Service\AutoDeFrag . exe xcopy "\\pc94\Service\Ad-aware 6" /E /H /Y /s "C:\Program Files\Lavasoft\Ad-aware 6\Ad-Aware . exe" "C:\" +a +1 +S C:\WINNT\system32\cleanmgr /d c: /sagerun:11 del /s /q /F "C:\WINNT\Temp\" del /s /q "C:\Documents and Settings\All Users\Start Menu\* . *" del /q "C:\Documents and Settings\vadal\Start Menu\* . *" copy "\\pc94\service\Start Menu\* . *" "C:\Documents and Settings\vadal\Start Menu" copy "\\pc94\service\Start Menu\Applications\* . *" "C:\Documents and Settings\vadal\Start Menu\Applications" copy "\\pc94\service\Start Menu\Programs\* . *" "C:\Documents and Settings\vadal\Start Menu\Programs" del /s /q "C:\Documents and Settings\Vadal\My Documents\" del /s /q "C:\Documents and Settings\Vadal\Cookies\" del /s /q "C:\Documents and Settings\Vadal\Local Settings\History\" del /s /q "C:\Documents and Settings\Vadal\Recent\" del /s /q "C:\Documents and Settings\Vadal\Local Settings\Temp\" del /s /q "C:\My Documents\" del /q /s "C:\Documents and Settings\Vadal\Desktop\* . *" echo cleaning desktop copy /y "\\pc94\service\Desktop\Dropbox . lnk" "C:\Documents and Settings\Vadal\Desktop" copy /y "\\pc94\service\Desktop\Send E-mail . lnk" "C:\Documents and Settings\Vadal\Desktop" if exist "C:\Eyespeak\EyeSpeak . exe" copy /y "\\pc94\service\Desktop\EyeSpeak . lnk" "C:\Documents and Settings\Vadal\Desktop" del /s /q "C:\Program Files\ICQ\Db99b\" del /s /q "C:\Program Files\ICQ\2000a\" del /s /q "C:\Program Files\ICQ\2000b\" del /s /q "C:\Program Files\ICQ\NewDB\" del /s /q "C:\Program Files\ICQ\UIN\" del /q "c:\* . *" dir > C:\shop1 . txt cd "C:\program files\navnt" NavLu32 . exe /silent navwnt . exe /L "C:\Program Files\Lavasoft\Ad-aware 6\AutoDeFrag . exe" cd c:\ chkdsk /V if errorlevel 3 chkdsk C: /F \\pc94\SERVICE\psshutdown . exe -t 10 -r -f -m "Service is Completed!!! Phil Rulez Your Computer will be shut down in 10 seconds - Thanks Vadal Team" \\%COMPUTERNAME% |
sc0ut (2899) | ||
| 185192 | 2003-10-21 11:58:00 | scOUT. I thank you for that and will be interested to see what's coming. :D FYI (and I hope this dosen't make you think "That's stupid, won't post it now!" :-( ) I found some compression demos that compress huge video/audio files in to 64Kb. I think, from my limited research so far, that they come from something called 'The Party' that happens in Europe (Denmark I think). Any way, I wanted to join a few of them together and as the are executables I thought........ :-) Yes I know what thought did, but if you don't ask you'll never learn!!!! :D Regards, the Cell |
Brain_Cell_Anon (261) | ||
| 185193 | 2003-10-21 13:11:00 | This small batch file will load up multiple files consecutively. I'm not sure how you get it to wait till the first one is finished before starting, but you could put the 'pause' command in, then all you have to do is press the space bar and it will continue with the next one etc. -------------- @echo off "C:\Links\Opera.lnk" echo Starting opera.. pause rem Note: For 2K/XP the batch file links to shortcuts of the actual exe's. "C:\Links\Icq.lnk" "C:\Links\Winamp.lnk" "C:\Links\Eudora.lnk" cls -------------- Remember, if there wasn't a pause in the batch file, then all the programs would open up at once. |
PoWa (203) | ||
| 185194 | 2003-10-21 20:00:00 | Brain_Cell_Anon, If you want to do something simple why not use the START command inside a batch command script. e.g. START /WAIT program1 START /WAIT program2 START /WAIT batchcmd1 START /WAIT link3 ... etc The information for the start command (for Windows NT-based systems e.g. WinXP): START: Starts a separate window to run a specified program or command. START ["title"] [/Dpath] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED] [/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL] [/WAIT] [/B] [command/program] [parameters] "title" Title to display in window title bar. path Starting directory B Start application without creating a new window. The application has ^C handling ignored. Unless the application enables ^C processing, ^Break is the only way to interrupt the application I The new environment will be the original environment passed to the cmd.exe and not the current environment. MIN Start window minimized MAX Start window maximized SEPARATE Start 16-bit Windows program in separate memory space SHARED Start 16-bit Windows program in shared memory space LOW Start application in the IDLE priority class NORMAL Start application in the NORMAL priority class HIGH Start application in the HIGH priority class REALTIME Start application in the REALTIME priority class ABOVENORMAL Start application in the ABOVENORMAL priority class BELOWNORMAL Start application in the BELOWNORMAL priority class WAIT Start application and wait for it to terminate command/program If it is an internal cmd command or a batch file then the command processor is run with the /K switch to cmd.exe. This means that the window will remain after the command has been run. If it is not an internal cmd command or batch file then it is a program and will run as either a windowed application or a console application. parameters These are the parameters passed to the command/program If Command Extensions are enabled, external command invocation through the command line or the START command changes as follows: non-executable files may be invoked through their file association just by typing the name of the file as a command. (e.g. WORD.DOC would launch the application associated with the .DOC file extension). See the ASSOC and FTYPE commands for how to create these associations from within a command script. When executing an application that is a 32-bit GUI application, CMD.EXE does not wait for the application to terminate before returning to the command prompt. This new behavior does NOT occur if executing within a command script. When executing a command line whose first token is the string "CMD " without an extension or path qualifier, then "CMD" is replaced with the value of the COMSPEC variable. This prevents picking up CMD.EXE from the current directory. When executing a command line whose first token does NOT contain an extension, then CMD.EXE uses the value of the PATHEXT environment variable to determine which extensions to look for and in what order. The default value for the PATHEXT variable is: .COM;.EXE;.BAT;.CMD Notice the syntax is the same as the PATH variable, with semicolons separating the different elements. When searching for an executable, if there is no match on any extension, then looks to see if the name matches a directory name. If it does, the START command launches the Explorer on that path. If done from the command line, it is the equivalent to doing a CD /D to that path. Cheers, Babe. |
Babe Ruth (416) | ||
| 185195 | 2003-10-22 12:16:00 | PoWa. Ta 4 that. Although I have to say ( this is me not you I should point out!! :8} ) that Im not sure what you mean by: a: "....put the 'pause' command in...." Does that mean between every line that has "C:\Links" etc. in it? b: "....the batch file links to shortcuts of the actual exe's...." I guess that means I have to make shortcuts to each app! ( ?? ) c: "....if there wasn't a pause in the batch file, then all the programs would open up at once." But there appears to be only one 'pause' there. ?:| I didn't do too well with batch files so I'm a little slow, please stay with me here!! :D Many thanks again, the Cell. |
Brain_Cell_Anon (261) | ||
| 185196 | 2003-10-22 12:29:00 | Very much appriciated Ms Ruth. Trying to sound greatfull but failing badly, :8} that short bit of code dosen't mean too much to me. Sorry. I'm fairly dense in the batch file area ( ok most areas as the 'Other Two Thirds' would have it!!! :-( LOL ) but can pick up most things if given some code to wreck first. :D I have some vague memories of how to get in to DOS and then basically even vague-er-er memories of how to start a batch file in note pad (I think) or is it in some form of editor in DOS??? Not sure now!! Even the 'Help' function stirs uneasy primordial feelings of lurking preditors 'out there, somewhere'!!!! :O Ho hum, sits on bum!! :p regards, the Cell |
Brain_Cell_Anon (261) | ||
| 185197 | 2003-10-22 13:15:00 | ---------- @echo off "C:\Links\Opera.lnk" echo Starting opera.. pause "C:\Links\Icq.lnk" echo Starting icq pause "C:\Links\Winamp.lnk" echo Starting winamp pause "C:\Links\Eudora.lnk" echo starting Eudora cls -------- So yea if there were no pauses in that, then they would all open at once. If I were to do this: --------- @echo off "C:\Links\Opera.lnk" echo Starting opera.. pause "C:\Links\Eudora.lnk" echo starting Eudora cls --------- Then it would start opera, and display a "Starting Opera..." message (thats what echo does), then a "Press any key to continue..." message. So you would push whatever key, and it would then go onto the next command and start up Eudora, display another message and then close the batch file (cls command). You put a pause in if you want the program to wait for the user to enter a key before continuing the script. >a: "....put the 'pause' command in...." >Does that mean between every line that has "C:\Links" etc. in it? Yes if you want to make it pause after a program has loaded. >b: "....the batch file links to shortcuts of the actual exe's...." >I guess that means I have to make shortcuts to each app! ( ?? ) Yea you do. Not too difficult but time consuming, just make the shortcuts, rename them and put them in a folder somewhere easy. I put them in a 'Links' folder. >c: "....if there wasn't a pause in the batch file, then all the programs would open up at once." >But there appears to be only one 'pause' there. Yes in my original example, it would've opened opera, waited for the user to press a key, then opened all the other programs at once. |
PoWa (203) | ||
| 185198 | 2003-10-23 00:17:00 | > Very much appriciated Ms Ruth. er... I had it on good authority that Ms Ruth is actually a Mr Ruth. :D |
Fire-and-Ice (3910) | ||
| 1 2 | |||||