Page 1 of 1 1
Topic Options
#21317 - 2002-05-07 10:11 PM run program with variant
rhylos Offline
Fresh Scripter

Registered: 2002-03-04
Posts: 15
I need a tip on the code to run a program without seeing the error return code in the logon console.

I cannot figure out the correct syntax for this. I've tried variants of the code below but it does not seem to do what I need. Perhaps I'm going about it the wrong way?

code:
   
$RUN = "Run G:\Setup\nortonav\Update\UPDATE.EXE"

(This code doesn't seem to run the exe.)

Thanks folks, the manual and some examples got me this far, now I need just one more nudge [Smile]
_________________________
rhylos

Top
#21318 - 2002-05-07 10:17 PM Re: run program with variant
BrianTX Offline
Korg Regular

Registered: 2002-04-01
Posts: 895
Try:

code:
shell "G:\Setup\nortonav\Update\UPDATE.EXE"

or

code:
RUN "G:\Setup\nortonav\Update\UPDATE.EXE"

(If you are getting values returned it's in something else.)

Brian

[ 07 May 2002, 22:30: Message edited by: BrianTX ]

Top
#21319 - 2002-05-07 10:21 PM Re: run program with variant
Schuliebug Offline
Hey THIS is FUN
*****

Registered: 2002-01-18
Posts: 379
Loc: Netherlands
Depends on the OS you are using. Mostly i use the following code which works fine for me:
code:
Shell '%ComSpec% /c  "fullpath\exe" options >nul 2>nul'

Above works fine for WNT and higher, but if you're using Win'95 just try the code [Smile]
_________________________
Kind regards,

Top
#21320 - 2002-05-07 10:26 PM Re: run program with variant
rhylos Offline
Fresh Scripter

Registered: 2002-03-04
Posts: 15
ok,

quote:
$ok = RUN "G:\Setup\nortonav\Update\UPDATE.EXE"
Give me the error: error in expression.

Also, I failed to mention that I do need to run the program with the run command as I need kix to wait on its execution vs shell continue on.
_________________________
rhylos

Top
#21321 - 2002-05-07 10:29 PM Re: run program with variant
BrianTX Offline
Korg Regular

Registered: 2002-04-01
Posts: 895
You've got it backwards...

SHELL waits for execution then returns the code to the script. RUN continues regardless of the script. ..

I messed up on my last post.. being idiotic today.

SHELL and RUN don't return a value automatically...

Brian

Top
#21322 - 2002-05-07 10:56 PM Re: run program with variant
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
RUN and SHELL are commands, not functions. Do not do a $OK = RUN.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#21323 - 2002-05-07 11:09 PM Re: run program with variant
rhylos Offline
Fresh Scripter

Registered: 2002-03-04
Posts: 15
Of course you all are correct [Mad] ,

Ok, I figured out after a while what you all already know. I was using the send key command and it was that command that was apparently returning the result code of "0".

Before:
code:
SENDKEYS ("{ENTER}")

After:
code:
$SENDKEYS = SENDKEYS ("{ENTER}")

Thanks for the nudge [Wink]

[ 07 May 2002, 23:39: Message edited by: rhylos ]
_________________________
rhylos

Top
#21324 - 2002-05-07 11:48 PM Re: run program with variant
kholm Offline
Korg Regular
*****

Registered: 2000-06-19
Posts: 714
Loc: Randers, Denmark
rhylos,

Why don't you start the intelligent updater with the silent switch: /q

RUN "G:\Setup\nortonav\Update\UPDATE.EXE /q"

No wait needed and no answer needed.

-Erik

Top
#21325 - 2002-05-07 11:55 PM Re: run program with variant
rhylos Offline
Fresh Scripter

Registered: 2002-03-04
Posts: 15
I would but the update.exe that we are told to run is the smaller update.exe that does not have the quite switch.
_________________________
rhylos

Top
Page 1 of 1 1


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

Who's Online
1 registered (Allen) and 363 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.06 seconds in which 0.026 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