Re: remote machine execution
- From: "James" <jkklim@xxxxxxxxxxx>
- Date: Mon, 7 Aug 2006 16:36:47 +0800
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"
.
- Follow-Ups:
- Re: remote machine execution
- From: Clay Calvert
- Re: remote machine execution
- From: Michael Bednarek
- Re: remote machine execution
- References:
- remote machine execution
- From: James
- Re: remote machine execution
- From: Michael Bednarek
- Re: remote machine execution
- From: James
- Re: remote machine execution
- From: Clay Calvert
- Re: remote machine execution
- From: James
- Re: remote machine execution
- From: Michael Bednarek
- Re: remote machine execution
- From: James
- Re: remote machine execution
- From: Michael Bednarek
- Re: remote machine execution
- From: James
- Re: remote machine execution
- From: Clay Calvert
- Re: remote machine execution
- From: Michael Bednarek
- remote machine execution
- Prev by Date: Re: problem in uninstall update script
- Next by Date: exact copy of files (also deletions) via command line
- Previous by thread: Re: remote machine execution
- Next by thread: Re: remote machine execution
- Index(es):
Relevant Pages
|