|
Thanks one and all. Could not get to work the traditional method as not all values were passing. The GetCommandLine() is new to me and now I am aware of it it is the best tool for the job. I am sure I can proceed with this help.
EDIT >>
The registry comment is VERY pertinant. It is in fact not KIX which is the problem but the fact it is NOT getting the parameters in the first place.
I have been using the following registry setting to envoke kix:(This is written on setting up each PC during logon script once wkix32 is installed.)
$ = WRITEVALUE ("HKEY_CLASSES_ROOT\KX_auto_file\shell\open\command", "", '%SystemRoot%\system32\wkix32.exe "%1"', "REG_SZ")
I have tried today the following... $ = WRITEVALUE ("HKEY_CLASSES_ROOT\KX_auto_file\shell\open\command", "", '%SystemRoot%\system32\wkix32.exe "%1" %2 %3 %4 %5 %6 %7 %8 %9', "REG_SZ")
and
$ = WRITEVALUE ("HKEY_CLASSES_ROOT\KX_auto_file\shell\open\command", "", '%SystemRoot%\system32\wkix32.exe "%1" "%2" "%3" "%4" "%5" "%6" "%7" "%8" "%9"', "REG_SZ")
If I have a command line as follows: WKIX32.EXE MYSCRIPT.KIX PARAMETER the script runs, passes the parameter correctly but on exiting the script KIX then tries to run a script per the value of PARAMETER and errors as of course the script does not exist.
If as is intended I have a command line as follows: MYSCRIPT.KIX PARAMETER
ERROR: Failed to open/find script [2]!
The start of the MYSCRIPT.KIX script is as follows...
$CL=GetCommandLine(0) If IsDeclared($CL) $CL=GetCommandLine(1) $X = UBound($CL) $ = MYFUNCTION($CL[$X]) EndIf
Here $X is returning 2 but $CL[2] does not exist ?
Can anyone offer suggestions on 1] how to sort out the registry settings and 2] let kix actually read the correct value of command line parameters. ( If I use SPLIT on the GetCommandLine(0) I could achieve the desired result but does not help until I can successfully pass a full command line without it erroring either on entry or exit.)
Edited by MACE (2007-07-16 04:11 PM)
|