In our organization we have a script that contains almost 2000 lines of kix.code!! After introducing 5 lines it failed and Iīve just found out what failed, but I donīt understand....

Example

$SERVER=LOCALSERVER

IF INGROUP ("101") GOTO "101"
IF INGROUP ("202") GOTO "202"

:101
USE E: "\\SERVER\ESHARE"
USE F: "\\SERVER\FSHARE"
GOTO "GENERAL"

:202
USE E: "\\SERVER\ESHARE"
USE F: "\\SERVER\FSHARE"

;CHANGE UNINSTALL PATH FOR MCAFEE
$mcafee = Readvalue
"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{87AEFD84-BC0D-11D4-B885-00508B022A51}","InstallSource")
If $mcafee="\\\\SERVER1\\mcafee\\Win32\\"
Else
SHELL "$SERVER\REPOSITORY\MCAFEE\BATCH.BAT" $SERVER"

ENDIF

GOTO "GENERAL"


:GENERAL

Here is the explanation and question.
When running this I want the users from different loactions to only run their part of the script, but if a user from "101" logs on, it runs the script and fails. It says tha it canīt find :LABEL, it means that it canīt jump to :GENERAL, which it doesnīt do.
Iīve found out that it fails because there is a (") too much in the line
SHELL "$SERVER\REPOSITORY\MCAFEE\BATCH.BAT" $SERVER"

This is true there shouldnīt have been one after BATCH.BAT. So the functioning line looks like this
SHELL "$SERVER\REPOSITORY\MCAFEE\BATCH.BAT $SERVER"

But why do the 101 users encounter this error since they never run the 202 section, where the line is???

Does kix read code that it is supposed to ignore???

Iīve tried for fun to introduce an error that fails.

GOTO "HI"
shell "c:\winnt\test.bat" localserver"
:HI

It never gets to :HI but fails and says that it canīt find :LABEL!!!!


Regards
Michael Hovej
Systemsconsultant