#122065 - 2004-07-02 11:43 AM
Re: Using compiled Kix script with parameters
|
acmp
Getting the hang of it
Registered: 2004-07-02
Posts: 69
Loc: Bingham, Nottinghamshire, Engl...
|
I must be having a bad day. I can't find any useful threads.
I have searched for various things including: service parameter pass compiled exe
And no joy, any chance you could help me out?
BTW: I don't have a problem with setting an exe as a service on an NT4/5/6 box, it's the passing parameters to kix that is giving me a headach.
acmp<><
_________________________
Every day is a school day
|
Top
|
|
|
|
#122066 - 2004-07-02 12:08 PM
Re: Using compiled Kix script with parameters
|
Richard H.
Administrator
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
Not sure why you had problems - a search for "service" turned up this recent thread immediately: http://www.kixtart.org/ubbthreads/showflat.php?Cat=&Number=120297&page=&view=&sb=5&o=&vc=1
To pass a parameter to KiXtart, you may either use an environment variable which is directly accessible in your script, or pass them on the command line: Code:
kix32.exe myscript.kix $foo="BAR"
This will set variable "$foo" to "BAR" in your script.
|
Top
|
|
|
|
#122067 - 2004-07-02 12:28 PM
Re: Using compiled Kix script with parameters
|
acmp
Getting the hang of it
Registered: 2004-07-02
Posts: 69
Loc: Bingham, Nottinghamshire, Engl...
|
I think I know the problem...
I'm not interested in services as such. What I want is to be able to pass parameters to a compiled kix script.
I want to use the compiled script (whatever.exe) with parameters ie. whatever.exe $path=\\server\share The reason is that I can then use the exe file with different params to check different folders. If I hard code the path info then I'll have to recompile the script everytime I add or change a path.
I think my reference to running it as a service has misled the thread.
I hope this is clearer.
acmp<><
_________________________
Every day is a school day
|
Top
|
|
|
|
#122070 - 2004-07-08 03:31 PM
Re: Using compiled Kix script with parameters
|
acmp
Getting the hang of it
Registered: 2004-07-02
Posts: 69
Loc: Bingham, Nottinghamshire, Engl...
|
Gave up with the registry and I am now using an INI file. It works a treat.
acmp<><
_________________________
Every day is a school day
|
Top
|
|
|
|
#122071 - 2004-07-12 03:21 PM
Re: Using compiled Kix script with parameters
|
acmp
Getting the hang of it
Registered: 2004-07-02
Posts: 69
Loc: Bingham, Nottinghamshire, Engl...
|
Thanks for the ideas and such on this.
I just found a GetOption() UDF over at kixhelp: http://www.kixhelp.com/udfs/udf/83476.htm
That looks as though it will take command line parameters from a packaged Kix script and let you reference them.
ho hum...
acmp<><
_________________________
Every day is a school day
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 515 anonymous users online.
|
|
|