RDM $Variables$ in cmd

avatar

Hello Forum,

can a session tool (cmd) understand $Variable$ from @Call RDM

i.g.

"D:\Dropbox\execute\Fping.exe" -c -T $IP$ && pause"
expected: D:\Dropbox\execute\Fping.exe" -c -T 192.168.120.5 && pause


$IP$ or $HOSTNAME$ wasn't replaced by "192.168.120.5" or "Server01"

All Comments (8)

avatar

What was the type of session that you tried to run the session tool?

David Hervieux

avatar

In Session ScriptTools it's declared as "Command Line". The tool is from http://fping.org/ and works well in cmd
edited by reredok on 9/24/2012

fping_rdm.jpg

avatar

Hi,
I have verified and it seems to work fine with the variable $HOST$

David Hervieux

avatar

Divided the call in cmd-File 2 Lines:

fpingcmd.cmd:
" ... "D:\Dropbox\execute\Fping.exe" -c -T $HOST$
pause
"
Message:

D:\Dropbox\execute>"D:\Dropbox\execute\Fping.
Host $HOST$ ignored

Fast pinger version 3.00
(c) Wouter Dhondt (http://www.kwakkelflap.com


No host specified

D:\Dropbox\execute>pause
Drücken Sie eine beliebige Taste . . .

avatar

Could you export me the session script?

David Hervieux

avatar

as .rdm

FPING.rdm

avatar

Hi,
I've verified and you need to pass $HOST$ in parameter. RDM is not able to replace the content of your cmd file.

David Hervieux

avatar

OK I understand ...

Macros/Script/Tools:
FPING
%ComSpec% /C D:\Dropbox\execute\fpingcmd.cmd $IP$
Script itself:
"D:\Dropbox\execute\Fping.exe" %1 -c -T
produces:
C:\Windows\system32>"D:\Dropbox\execute\Fping.exe" 10.135.37.130 -c -T

Fast pinger version 3.00
(c) Wouter Dhondt (http://www.kwakkelflap.com)

Pinging 10.135.37.130 with 32 bytes of data every 1000 ms:

14:13:50.648 : Reply[1] from 10.135.37.130: bytes=32 time=6.0 ms TTL=126
14:13:51.652 : Reply[2] from 10.135.37.130: bytes=32 time=3.3 ms TTL=126