Re: remote machine execution



ECHO will always works, BUT if u ever pass parameters to batch file, it will
not work.

Eg remote machine drive contains a batch file
remotemachine.bat
Echo args are : %1 %2 %3

my own local machine i run
psexec \\remotemachine -s <drive>:\remotemachine.bat /AdvCli
"/SLP=smsserver"

results :
Args are: /advcli /slp smsserver

I tried all variants below and still get the same results.

The results i want is :

Args are: /advcli /slp=smsserver



"Michael Bednarek" <ROT13-zo@xxxxxxxxxx> wrote in message
news:skldd2dpcm1s9f0kkb0a9p8m7t3r9dbvch@xxxxxxxxxx
On Sun, 06 Aug 2006 22:46:30 -0400, Clay Calvert wrote in
microsoft.public.windows.server.scripting:

On Mon, 7 Aug 2006 08:47:33 +0800, "James" wrote:

The current problem in psexec is they cannot pass "=" sign over to remote
machines.

Try escaping it with a "^".

psexec \\%1 "%remote_drive%:\%remote_dir_install%\Capinst.exe" /AdvCli
/SLP^=smsserver

... or quoting that token.

psexec \\%1 "%remote_drive%:\%remote_dir_install%\Capinst.exe" /AdvCli
"/SLP=smsserver"

Clay,

Did you verify that the "=" sign is not passed? Because here, this
command works:

$ psexec \\host -s cmd.exe /c Echo /AdvCli /SLP=smsserver
PsExec v1.55 - Execute processes remotely
Copyright (C) 2001-2004 Mark Russinovich
Sysinternals - www.sysinternals.com


/AdvCli /SLP=smsserver
cmd.exe exited on host with error code 0.

You suggestion to escape and/or quote works as well:
$ psexec \\tgm69 -s cmd.exe /c Echo /AdvCli /SLP^=smsserver
[...]
/AdvCli /SLP=smsserver
cmd.exe exited on host with error code 0.
and
$ psexec \\tgm69 -s cmd.exe /c Echo /AdvCli "/SLP=smsserver"
[...]
/AdvCli /SLP=smsserver
cmd.exe exited on host with error code 0.
and
$ psexec \\tgm69 -s cmd.exe /c Echo /AdvCli "/SLP^=smsserver"
[...]
/AdvCli /SLP=smsserver
cmd.exe exited on host with error code 0.

That's four working variants.

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


.



Relevant Pages

  • Re: Messages stuck in Outbound messages awaiting delivery queue
    ... The only message displayed in the details is "Host ... stuck in the oubound queue. ... >will show you an error code. ... >Please do not send email directly to this alias. ...
    (microsoft.public.exchange.connectivity)
  • Re: remote machine execution
    ... Copyright 2001-2006 Mark Russinovich ... Sysinternals - www.sysinternals.com ... 4NT.exe exited on host with error code 0. ...
    (microsoft.public.windows.server.scripting)
  • Re: RE: Error Code 81000314
    ... ive had a similar problem b4.....but i forgot the error code. ... i deleted the host address n logged back in msn. ... ive already solved the prob. ...
    (microsoft.public.windowsxp.messenger)
  • Re: Compiling m-file to C
    ... It starts compiling from m- ... operable program or batch file. ... (error code = 1). ... Error executing mcc, return status = 1. ...
    (comp.soft-sys.matlab)
  • Re: Changing "Failed" Error Code
    ... A two line batch file: ... updated", but, SMS interprets this as a Failure in the Log. ... Is it possible to intercept this, so that the Error Code of 44 is not ...
    (microsoft.public.sms.admin)