Page 1 of 1 1
Topic Options
#74647 - 2003-04-22 04:57 PM Problem with SHELL command
GRF Offline
Fresh Scripter

Registered: 2002-02-15
Posts: 45
Loc: Ohio
I'm trying to get this to run from KiX.

code:
  ;  Downtime Events
$DUMP = "dumpel.exe -s server -l system -m eventlog -e 6008 6009 -t -format cutds >>o:\all\downtime.log"
IF (@WKSTA) = ("server")
shell "$DUMP"
ENDIF

If I cut and paste the command in a Dos window it works fine. When I execute it from KiX, it returns the Dumpel Usage screen. Any thoughts?
Thanks,
_________________________
GF

Top
#74648 - 2003-04-22 05:00 PM Re: Problem with SHELL command
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
What about..

shell "%COMSPEC% /C "+$DUMP

HTH,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#74649 - 2003-04-22 05:02 PM Re: Problem with SHELL command
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
See also ReadEventlog() - Retrieves event from the eventlog
_________________________
There are two types of vessels, submarines and targets.

Top
#74650 - 2003-04-22 05:02 PM Re: Problem with SHELL command
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
if you are redirecting and FINDing, you need %comspec% /c
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#74651 - 2003-04-22 05:22 PM Re: Problem with SHELL command
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
This is covered in the FAQ
Topic: Not quite everything you wanted to know about RUN and SHELL
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#74652 - 2003-04-22 05:24 PM Re: Problem with SHELL command
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Oh, and why the parens...

IF (@WKSTA) = ("server")

and while I'm at it, why the quotes...

shell "$DUMP"

[ 22. April 2003, 17:26: Message edited by: LLigetfa ]
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#74653 - 2003-04-22 05:39 PM Re: Problem with SHELL command
GRF Offline
Fresh Scripter

Registered: 2002-02-15
Posts: 45
Loc: Ohio
shell "%COMSPEC% /C "+$DUMP worked. Thanks a bunch. As for the () and "", I wasn't sure if they were necessary or not.

Thanks again,
_________________________
GF

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1452 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.062 seconds in which 0.031 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org