Re: remote machine execution



On Mon, 31 Jul 2006 10:12:11 +0800, "James" wrote in
microsoft.public.windows.server.scripting:

i create a local batch files that does something of this nature :

I use robocopy and copy my files to remote machine directory. The next step
i wish to do is to execute the batch files on the remote machines directory.
What is the best way to do that ? Seems psexec don't work, or shld i write a
vbscript to call remotely the batch files that i copied ?

*********************************************
For /F %%i In (%filename%) Do Call :Ping4Name %%i

:Ping4Name
For /F "Tokens=2" %%a In ('ping -n 1 %1 ^| find /i "Reply"') Do (
robocopy %local_path% \\%1\%remote_drive%$\%remote_dir%)

:: how do i execute the next statement ? using batch file is easy, but shld
i write a vbscript on it ?
:: \\%1\%remote_drive%$\%remote_dir%\cleanup.bat)
goto :eof
*************************************************

How exactly does psexec not work? This should:
psexec \\%1 %remote_drive%:\%remote_dir%\cleanup.bat

--
Michael Bednarek http://mbednarek.com/ "POST NO BILLS"
.



Relevant Pages

  • remote machine execution
    ... I use robocopy and copy my files to remote machine directory. ... i wish to do is to execute the batch files on the remote machines directory. ... vbscript to call remotely the batch files that i copied? ...
    (microsoft.public.windows.server.scripting)
  • Re: [ Attn: Randy ] Ad-hoc Parsing?
    ... > It can execute the .com file as easily as a command.com or cmd.exe batch file can. ... Is this true for any new Linux distribution. ... > Bash scripts can drop and launch .com files as easily as DOS batch files can. ...
    (alt.lang.asm)
  • Process not giving prompt back with Runtime.exec!
    ... after I execute a couple of batch files using the Runtime.exec method. ... I wrote an application in Java on the Win XP platform that basically ... Since the server process was started from a Java ...
    (comp.lang.java.help)
  • Re: Windows cannot access the specified device, path, or file........
    ... This posting is provided "AS IS" with no warranties, and confers no rights. ... not execute any exe or batch files off a different machine? ...
    (microsoft.public.windows.server.general)
  • Re: Process.Start Problem with WaitForExit(), WaitForExit DOES NOT WA
    ... what are you batch files doing? ... the first process takes about 10 minutes to finish. ... > immediately to execute code after the WaitForExit(). ...
    (microsoft.public.dotnet.languages.csharp)