Help With Shell Script

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
RRing
Posts: 39
Joined: Wed Aug 16, 2006 9:14 am

Help With Shell Script

Post by RRing »

I have just setup a shell script to return time from a remote computer, but my script returns no results. What am I doing wrong here? Thanks in Advance.

Start Cmd: cmd /c %Script% %Params%
Script:
@echo off

Net Time %1

echo ScriptRes:Ok:%Reply%

exit
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

You do not assign result of the "net time" command to any variable.
Script should be like
================
@echo off
Net Time %1 >res.tmp
set /P res1=< res.tmp
del res.tmp
echo ScriptRes:Ok:%res1%
================

Regards
Alex
RRing
Posts: 39
Joined: Wed Aug 16, 2006 9:14 am

Script Problem

Post by RRing »

Works Great- Thanks for your help as always Alex.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

No problem :)

Regards
Alex
Post Reply