Re: remote machine execution
- From: Michael Bednarek <ROT13-zo@xxxxxxxxxxxxx>
- Date: Mon, 31 Jul 2006 21:50:16 +1000
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"
.
- Follow-Ups:
- Re: remote machine execution
- From: James
- Re: remote machine execution
- References:
- remote machine execution
- From: James
- remote machine execution
- Prev by Date: Re: Vbscript control
- Next by Date: Re: How to add a URL to each users desktop
- Previous by thread: remote machine execution
- Next by thread: Re: remote machine execution
- Index(es):
Relevant Pages
|