|
Answer» Hi, after a bit of help/advice please..
i have a series of DOS batch scripts which are "controlled" by a master script, CALLing each step as it goes
i.e call \\server1\folder\script1.bat call \\server2\folder\script2.bat call \\server1\folder\script3.bat
This executes all the scripts from the SERVER they are called from (i.e. server1), however in my case, script2 for example runs ISQL scripts and the server1 this runs from doesn't have SQL installed (server2 does) meaning it doesn't work....it processes but doesn't action the ISQL commands...
I can't transfer all the scripts to the other server as the 3rd party app that runs them cant see outside its own environment and even if I do another single script to call all the scripts from server2 I still have the same issue...
So my question is, is there a WAY to make script2 actually execute on Server2 (rather than Server1) (yet still run script1 and script3 on server1) ?
Cheers
PeterSmYou can use the AT command to schedule the batch file to run on a remote computer a few seconds from "now". Or use the SOON.EXE command from Microsoft (http://www.microsoft.com/downloads/details.aspx?FamilyID=CA8191E6-9EEF-4975-B51C-8D670748CA8E&displaylang=en)
Then you could do something like: Code: [Select]call \\server1\folder\script1.bat soon.exe \\server2 /i "\\server2\folder\script2.bat" call \\server1\folder\script3.batyou could use pstools.
something like,
start c:\location-of-pstools-folder\psexec \\computername C:\location on remote machine of script -u USERNAME -p password
that will run whatever app you want (with whatever CREDENTIALS you require) on the remote machine but display it on yours.
I use it all the time. It's very handy.
|