Dear,Your script contains an error. Missing endif.
Some remarks:
- we think your meaning with line
IF @wksta <> 'test-a' AND @wksta <> 'test-b' AND @wksta <> 'test-c' AND @wksta <> sfu1-018
is: run script test.scr when workstation name is one of those names.
YES: change it to
@wksta = 'test-a' OR @wksta = 'test-b' OR @wksta = 'test-c' OR @wksta = sfu1-018
- same remark about your line IF @wksta <> 'preprod-a' AND @wksta <> 'preprod-b'
change it to IF @wksta = 'preprod-a' OR @wksta = 'preprod-b'
- use MessageBox instead of ? 'Press any key to continue...'.
You doesn't need the BEEP command by using the MessageBox function.
We verify your code with our tool kixstrip.
Result:
code:
IF @wksta <> 'test-a' AND @wksta <> 'test-b' AND @wksta <> 'test-c' AND @wksta <> sfu1-018
CALL Test.scr
$process_login='n'
?'Dublin Login scripts are NOT run on Test Machines.'
?
BEEP
BEEP
?'Press any key to continue...'
IF @wksta <> 'preprod-a' AND @wksta <> 'preprod-b'
CALL Preprod.scr
$process_login='n'
?'Dublin Login scripts are NOT run on Pre-Production Machines.'
?
BEEP
BEEP
?'Press any key to continue...' ELSE
IF exist ('c:\winnt\canflag.txt')=1
$process_login='n'
?'Dublin Login scripts are NOT run on Canada Machines.'
?' Please call 4500 for more info.'
?
BEEP
BEEP
?'Press any key to continue...'
GET $t
ELSE
$process_login='y'
ENDIF
; if on nala
IF $process_logon='y'
?
?'Processing NT system logon script...'
;($begin)
;
; fri 26-oct-2001 00:25:49 (kix 4.00 vs 2.29e)
;
;Informative KIXSTRIP: input=32 output=32 skip=0
;
;Warning KIXSTRIP: 1 error in block structure. missing statement(s).
; - do:until [0:0]
; - for|each:in|to:step|next [0|0:0|0:0|0]
; - function:endfunction [0:0]
; -ERROR- - if:else:endif [4:2:1]
; - select:case:endselect [0:0:0]
; - while:loop [0:0]
;Warning KIXSTRIP: some lines contains errors or possible errors.
;Informative KIXSTRIP: 4 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: 2 CALL
;Informative KIXSTRIP: 1 GET
;
;($end)
We restyle your script a little bit.
Our version is:
code:
$process_login="y"
SELECT
CASE (@wksta = "test-a") OR (@wksta = "test-b") OR (@wksta = "test-c") OR (@wksta = "sfu1-018")
CALL test.scr
$process_login="n"
$result=MessageBox("Dublin Login scripts are NOT run on Test Machines.","Login process",16,30)
CASE (@wksta = "preprod-a") OR (@wksta = "preprod-b")
CALL preprod.scr
$process_login="n"
$result=MessageBox("Dublin Login scripts are NOT run on Pre-Production Machines.","Login process",16,30)
CASE 1
IF (Exist("c:\winnt\canflag.txt") = 1)
$process_login="n"
$result=MessageBox("Dublin Login scripts are NOT run on Canada Machines."+CHR(13)+" Please call 4500 for more info.","Login process",16,30)
ELSE
$process_login="y"
ENDIF
ENDSELECTIF ($process_logon = "y")
? "Processing NT system logon script..."
ENDIF
greetings.