#34523 - 2002-12-18 10:58 PM
Label not found! ????
|
NuclearKitten
Fresh Scripter
Registered: 2002-11-14
Posts: 47
|
Why am I getting "Script error: Label [SophMissing] not found!" when the label is just a couple lines down? Any ideas? code:
:win9x $IcMon = READVALUE("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run", "InterCheckMonitor") if @error goto "SophMissing" if $IcMon = ""C:\\PROGRAM FILES\\SOPHOS SWEEP\\ICMON.EXE\" -minimised"" goto "Chk9xFiles" endif endif :Chk9xFiles IF EXIST ("C:\Program Files\Sophos SWEEP\ICMON.exe") GOTO "Sophos_IS_INSTALLED" else GOTO "chkd" endif :chkd IF EXIST ("D:\Program Files\Sophos SWEEP\ICMON.exe") GOTO "Sophos_IS_INSTALLED" else GOTO "chke" endif :chke IF EXIST ("E:\Program Files\Sophos SWEEP\ICMON.exe") GOTO "Sophos_IS_INSTALLED" endif
:SophMissing
TIA!
|
|
Top
|
|
|
|
#34525 - 2002-12-18 11:12 PM
Re: Label not found! ????
|
ElegantSol
Fresh Scripter
Registered: 2002-11-28
Posts: 34
Loc: Cranbury, NJ, USA
|
Look at the line:
""C:\\PROGRAM FILES\\SOPHOS SWEEP\\ICMON.EXE\" -minimised""
"C:\\PROGRAM FILES\\SOPHOS SWEEP\\ICMON.EXE\ -minimised"
I believe is what you want.
Double \ and " are not required in strings or if they are " xxx 'yyyy' xxx" is appropriate.
_________________________
Stephen
If the solution to the problem be concise and artfully or ingeniously contrived yet simple and handsome in effect, then the solution merits the adjective elegant. -- K.G. Wilson
|
|
Top
|
|
|
|
#34526 - 2002-12-18 11:20 PM
Re: Label not found! ????
|
NuclearKitten
Fresh Scripter
Registered: 2002-11-14
Posts: 47
|
The value in the registry has quotation marks. That portion of the script is working.
SL - I have searched for that thread and can't seem to find it.
|
|
Top
|
|
|
|
#34527 - 2002-12-18 11:24 PM
Re: Label not found! ????
|
ElegantSol
Fresh Scripter
Registered: 2002-11-28
Posts: 34
Loc: Cranbury, NJ, USA
|
If the value in the registry has "" use ' ' to surround the string. I changed the quotes and the error went away.
Steve
_________________________
Stephen
If the solution to the problem be concise and artfully or ingeniously contrived yet simple and handsome in effect, then the solution merits the adjective elegant. -- K.G. Wilson
|
|
Top
|
|
|
|
#34529 - 2002-12-18 11:27 PM
Re: Label not found! ????
|
NuclearKitten
Fresh Scripter
Registered: 2002-11-14
Posts: 47
|
danke - SL, I found the thread. Thanks.
|
|
Top
|
|
|
|
#34530 - 2002-12-19 09:54 PM
Re: Label not found! ????
|
MCA
KiX Supporter
   
Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
|
Dear,
With our tool kixstrip which you can find on our site you can verify your kixtart code. After the call kixstrip input.kix output.kix /block_check which returns
code:
:win9x $icmon = READVALUE("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run", "InterCheckMonitor") IF @error GOTO "SophMissing" IF $icmon = ""C:\\PROGRAM FILES\\SOPHOS SWEEP\\ICMON.EXE\" -minimised"" GOTO "Chk9xFiles" ENDIF ENDIF :chk9xfiles IF EXIST ("C:\Program Files\Sophos SWEEP\ICMON.exe") GOTO "Sophos_IS_INSTALLED" ELSE GOTO "chkd" ENDIF :chkd IF EXIST ("D:\Program Files\Sophos SWEEP\ICMON.exe") GOTO "Sophos_IS_INSTALLED" ELSE GOTO "chke" ENDIF :chke IF EXIST ("E:\Program Files\Sophos SWEEP\ICMON.exe") GOTO "Sophos_IS_INSTALLED" ENDIF
:sophmissing
;($begin) ; ; thu 19-dec-2002 09:32:07 (kix 4.10 vs 3.20e) ; ;Summary KIXSTRIP: block structures ; - do:until [0:0] ; - for|each:in|to:step|next [0|0:0|0:0|0] ; - function:endfunction [0:0] ; - if:else:endif [5:2:5] ; - select:case:endselect [0:0:0] ; - while:loop [0:0] ;Warning KIXSTRIP: 1 line is incompleted. ; rerun program with option "/block_check /show_errors". ;Warning KIXSTRIP: some lines contains errors or possible errors. ; 1 line incomplete "double quotation". ; 1 line incompleted. ;Informative KIXSTRIP: 5 block_structures found. ;Informative KIXSTRIP: no UDF's found. ;Informative KIXSTRIP: 5 labels found. ;Summary KIXSTRIP: BREAK CALL DEBUG DISPLAY ENDFUNCTION EXECUTE EXIT FUNCTION GET GETS GOSUB GOTO OLExxx PLAY QUIT RETURN RUN SHELL SLEEP THEN USE ;Informative KIXSTRIP: 7 GOTO ; ;($end) ;($begin) ; ;Warning KIXSTRIP: 5 line incomplete "double quotation". ;Warning KIXSTRIP: 5 line incompleted. ; ;($end)
Your 5th line should be something like
code:
IF $icmon = '"C:\\PROGRAM FILES\\SOPHOS SWEEP\\ICMON.EXE\" -minimised'
A reduction of your code can result in following script
code:
$sophos_installed="yes" $icmon = READVALUE("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run", "InterCheckMonitor") IF (Len($icmon) <> 0) IF (Instr($icmon,"ICMON.EXE") <> 0) AND (Instr($icmon,"-minimised") <> 0) IF (Exist("C:\Program Files\Sophos SWEEP\icmon.exe") = 0) AND (Exist("D:\Program Files\Sophos SWEEP\icmon.exe") = 0) AND (Exist("E:\Program Files\Sophos SWEEP\icmon.exe") = 0) $sophos_installed="no" ENDIF ELSE $sophos_installed="no" ENDIF ELSE $sophos_installed="no" ENDIF IF ($sophos_installed = "no") ? "Informative SOPHOS: not installed" ELSE ? "Warning SOPHOS: not installed" ENDIF
greetings.
btw: symbol on our homepage has been linked to related http://kixtart.org topic.
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 640 anonymous users online.
|
|
|