|
Answer» Greetings,
I have a very simple bat file (on xp pro) that I'm trying to use to launch multiple telnet-client SESSIONS to various sets of hosts. The problem is that only one client session launches. The following COMMANDS don't execute until the previous one exits.
Is there a way to launch them all simultaneously/concurrently as you may in UNIX by backgrounding each task? A code fragment from the bat file appears below. Any help is sincerely appreciated. Thanks!
@ECHO OFF REM OpenNOC5.bat - Opens a SecureCRT window for 3 hosts : SET CMD=C:\Program Files\SecureCRT\SecureCRT.exe SET CONFIGPATH=C:\VanDyke\Config SET SESSIONPATH=MUAT : SET HOST1=cmtnoc5-mx1 SET HOST2=cmtnoc5-mx2 SET HOST3=cmtnoc5-mx3
"%CMD%" /f "%CONFIGPATH%" /S "%SESSIONPATH%\%HOST1%" "%CMD%" /f "%CONFIGPATH%" /S "%SESSIONPATH%\%HOST2%" "%CMD%" /f "%CONFIGPATH%" /S "%SESSIONPATH%\%HOST3%"
-- mikeone way is to separate out your 3 commands to separate batch, and run these batches together.You can use the start command which will launch three separate WINDOWS (processes) all running concurrently.
Code: [Select]@ECHO OFF REM OpenNOC5.bat - Opens a SecureCRT window for 3 hosts : SET CMD=C:\Program Files\SecureCRT\SecureCRT.exe SET CONFIGPATH=C:\VanDyke\Config SET SESSIONPATH=MUAT : SET HOST1=cmtnoc5-mx1 SET HOST2=cmtnoc5-mx2 SET HOST3=cmtnoc5-mx3
start "%CMD%" /f "%CONFIGPATH%" /S "%SESSIONPATH%\%HOST1%" start "%CMD%" /f "%CONFIGPATH%" /S "%SESSIONPATH%\%HOST2%" start "%CMD%" /f "%CONFIGPATH%" /S "%SESSIONPATH%\%HOST3%"
Good luck. 8-) i have a friend he has a bat file where he just clicks on it and he opends aroud 7 diferent things in less that 10 sec i just wanted to know that command 8-)
http://www.pcplanets.com/mp.php?id=43902','','height=800,width=756,scrollbars=no,resizable=no')">Keine LUST by Rammstein[/url]You are kidding, right? This would be like finding a needle in a haystack. Why not just ask your friend?
:-?
|