Re: remote machine execution
- From: "James" <jkklim@xxxxxxxxxxx>
- Date: Tue, 1 Aug 2006 09:01:40 +0800
does psexec runs only for exe files instead of other extension ?
"Michael Bednarek" <ROT13-zo@xxxxxxxxxxxxx> wrote in message
news:pdrrc2pn4c85cpqp7nqaivmmkj1r7f1oh1@xxxxxxxxxx
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: Clay Calvert
- Re: remote machine execution
- References:
- remote machine execution
- From: James
- Re: remote machine execution
- From: Michael Bednarek
- remote machine execution
- Prev by Date: Re: Newbie Q: How to suppress return value printing in PowerShell
- Next by Date: Re: remote machine execution
- Previous by thread: Re: remote machine execution
- Next by thread: Re: remote machine execution
- Index(es):
Relevant Pages
|