Re: remote machine execution



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"


.



Relevant Pages

  • Re: netsh and DHCP server
    ... Unfortunately psexec sends the password as clear text, ... >> remote machine, I want to be able to make changes to DHCP. ... >> Unable to determine the DHCP Server version for the Server ... >> I need to execute commands using a script though, ...
    (microsoft.public.windows.server.scripting)
  • Re: remote machine execution
    ... i tried and it only pass the exe over the remote machine without the ... What happens when you execute the command line locally on machine nol-b0000586? ... you use any credentials to run the command via psexec, ... I suspect that the process spawned by psexec on the remote PC needs some network ...
    (microsoft.public.windows.server.scripting)
  • PSExec vs Task Scheduler
    ... Can someone explain/clarify any differences between launching processes on ... a remote machine using psexec with/without specific user credentials? ... If I stage the installation file to the remote machine (a Wise created .exe ...
    (microsoft.public.win2000.cmdprompt.admin)
  • Re: any one know how to use psexec
    ... > i am trying to execute an exe file over remote machine and ... The correct syntax is: ... Set the value of: AutoShareServer to 1 ...
    (microsoft.public.win2000.general)