#20181 - 2002-04-19 09:35 AM
delvalue not working
|
GrahamA
Lurker
Registered: 2002-04-18
Posts: 2
|
I`m new to kixtart and am having troubles with a script i`m writing, every time i run it on a win98 machine it tells me there is an error in the parameters on the delvalue command though using the same command on a win2k works properly. Is there something obvious i'm missing or what? Anyway here's the code and thanks for any help. $index=0 $key=0 $currip=0 $err=0
If @INWIN <> 1 ; check windows version $key=EnumKey(hkey_local_machine\system\currentcontrolset\services\class\nettrans,$index) $err=@ERROR $currip=ReadValue('hkey_local_machine\system\currentcontrolset\services\class\nettrans\$key','ipaddress') If $err=0 AND $currip<>'0.0.0.0'; check it needs changing and perform changes WriteValue('hkey_local_machine\system\currentcontrolset\services\class\nettrans\$key','ipaddress','0.0.0.0','reg_sz') WriteValue('hkey_local_machine\system\currentcontrolset\services\class\nettrans\$key','ipmask','0.0.0.0','reg_sz') WriteValue('hkey_local_machine\system\currentcontrolset\services\vxd\mstcp','enabledns','0','reg_sz' DelValue('hkey_local_machine\system\currentcontrolset\services\vxd\mstcp','nameserver') EndIf EndIf
Exit
|
|
Top
|
|
|
|
#20185 - 2002-04-19 10:35 AM
Re: delvalue not working
|
GrahamA
Lurker
Registered: 2002-04-18
Posts: 2
|
Thanks mate. I can`t believe it 4hrs of looking and i miss a damn bracket As far as 2k goes i just copied and pasted that line into a seperate program and ran it from there, anywaqy thanks again.
|
|
Top
|
|
|
|
#20186 - 2002-04-20 09:31 PM
Re: delvalue not working
|
MCA
KiX Supporter
   
Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
|
Dear GrahamA,
Also welcome to the board.
What apity it cost four hours. With our kixstrip tool you can verify your script for such errors. Currently there are three versions
- kixstrip363.exe (= kixtart 3.63)
- kixstrip400.exe (= kixtart 4.00, 4.01, 4.02)
- kixstrip410.exe (= kixtart 4.10 build 84)
Our call kixstrip input.kix output.kix /block_check /show_errorswill result in:
code:
$index=0 $key=0 $currip=0 $err=0
IF @inwin <> 1 ; check windows version $key=EnumKey(hkey_local_machine\system\currentcontrolset\services\class\nettrans,$index) $err=@error $currip=ReadValue('hkey_local_machine\system\currentcontrolset\services\class\nettrans\$key','ipaddress') IF $err=0 AND $currip<>'0.0.0.0'; check it needs changing and perform changes WriteValue('hkey_local_machine\system\currentcontrolset\services\class\nettrans\$key','ipaddress','0.0.0.0','reg_sz') WriteValue('hkey_local_machine\system\currentcontrolset\services\class\nettrans\$key','ipmask','0.0.0.0','reg_sz') WriteValue('hkey_local_machine\system\currentcontrolset\services\vxd\mstcp','enabledns','0','reg_sz' ; -------> Warning KIXSTRIP: 13 line incomplete "left parenthesis". ; -------> Warning KIXSTRIP: 13 line incompleted. DelValue('hkey_local_machine\system\currentcontrolset\services\vxd\mstcp','nameserver') ENDIF ENDIF
EXIT
;($begin) ; ; sat 20-apr-2002 10:01:34 (kix 4.10 vs 3.04e) ; ;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 [2:0:2] ; - select:case:endselect [0:0:0] ; - while:loop [0:0] ;Warning KIXSTRIP: 1 line is incompleted. ;Warning KIXSTRIP: some lines contains errors or possible errors. ; 1 line incomplete "left parenthesis". ; 1 line incompleted. ;Informative KIXSTRIP: 2 block_structures found. ;Informative KIXSTRIP: no UDF's found. ;Informative KIXSTRIP: no 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: 1 EXIT ; ;($end) ;($begin) ; ;Warning KIXSTRIP: 13 line incomplete "left parenthesis". ;Warning KIXSTRIP: 13 line incompleted. ; ;($end)
greetings.
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 764 anonymous users online.
|
|
|