Use of the command PAUSE in login script...

I want this login script to pause so I can take a look at what is wrong but it only pauses after the first two PAUSE commands. It does not pause for the last PAUSE command. What am I doing wrong? Thanks.
; NO_DEFAULT
;MAP DISPLAY OFF
;MAP ERRORS OFF
;MAP INS S1:=COUGAR-1/SYS:PUBLIC
MAP F:=COUGAR-1/SYS:
PAUSE
MAP I:=COUGAR-1/DATA_APPS:
MAP ROOT T:=ELEM/SYS:
MAP ROOT H:=COUGAR-1/DATA_APPS:home\%LOGIN_NAME
PAUSE
IF MEMBER OF "HSFACULTY" THEN
MAP ROOT G:=COUGAR-1/DATA_APPS:winschl\gradebooks\HS\%LOGIN_NAME
MAP ROOT L:=COUGAR-1/DATA_APPS:winschl\lessons\HS\%LOGIN_NAME
MAP ROOT R:=COUGAR-1/DATA_APPS:winschl\~rosters
End
REM ****** Client Update Win98 ************
If PLATFORM = "W98" THEN
WRITE "Updating your Novell Client Win98"
#\\cougar-1\sys\public\clients\win95\ibm_enu\acu.exe
IF "%ERROR_LEVEL" = "1" THEN BEGIN
EXIT
END
If PLATFORM = "WNT" THEN
WRITE "Updating your Novell Client XP"
#\\cougar-1\sys\public\clients\winnt\i386\acu.exe
IF "%ERROR_LEVEL" = "1" THEN BEGIN
EXIT
END
PAUSE

Manson Northwest Webster-Home of the Cougars!
Brad Kruse ("`-''-/").___..--''"`-._
Tech. Coord. `6_ 6 ) `-. ( ).`-.__.`)
1601 15th St. (_Y_.)' ._ ) `._ `. ``-..-'
Manson, IA 50563 _..`--'_..-_/ /--'_.' ,'
712-469-3919 (li),' ((!.-'
Fax 712-469-3131

  • On Mon, 01 Aug 2005 20:10:01 GMT, "Brad Kruse"
    <kruseb@manson-nw.k12.ia.us> wrote:

    >I want this login script to pause so I can take a look at what is wrong but it only pauses after the first two PAUSE commands. It does not pause for the last PAUSE command. What am I doing wrong? Thanks.


    The EXIT command terminates execution of the login utility, so if the
    workstation is either a Win 98 or Win NT family, the login script
    never reaches the third PAUSE. Replace EXIT with END if you want the
    script to run all the way through.

    ---------------
    Donald Albury
    Novell Product Support Volunteer SysOp
    Sorry, no replies to e-mail responses

    "If something is so complicated that you can't
    explain it in 10 seconds, then it's probably not
    worth knowing anyway." Bill Waterson
  • Hi Brad,

    Get rid of the BEGIN, it is not a valid login script command.
    So the END is connected to the first IF statement, which is always true (either WNT or W98), so the EXIT is executed in all cases (indentation is not recognised by the loginscript), ending the login script execution immediately. I think.

    Peter


    If PLATFORM = "W98" THEN
    WRITE "Updating your Novell Client Win98"
    #\\cougar-1\sys\public\clients\win95\ibm_enu\acu.exe
    IF "%ERROR_LEVEL" = "1" THEN BEGIN
    EXIT
    END
    If PLATFORM = "WNT" THEN
    WRITE "Updating your Novell Client XP"
    #\\cougar-1\sys\public\clients\winnt\i386\acu.exe
    IF "%ERROR_LEVEL" = "1" THEN BEGIN
    EXIT
    END
    PAUSE


  • Brad,

    > I want this login script to pause so I can take a look at what is wrong
    > but it only pauses after the first two PAUSE commands. It does not
    > pause for the last PAUSE command. What am I doing wrong? Thanks.


    The script is never getting to it:

    > If PLATFORM = "W98" THEN
    > WRITE "Updating your Novell Client Win98"
    > #\\cougar-1\sys\public\clients\win95\ibm_enu\acu.exe
    > IF "%ERROR_LEVEL" = "1" THEN BEGIN
    > EXIT
    > END


    The above end closes off the the IF above it (IF "%error .... ), but
    we're still in the code for if W98.

    > If PLATFORM = "WNT" THEN
    > WRITE "Updating your Novell Client XP"
    > #\\cougar-1\sys\public\clients\winnt\i386\acu.exe
    > IF "%ERROR_LEVEL" = "1" THEN BEGIN
    > EXIT
    > END
    > PAUSE



    Change to:

    If PLATFORM = "W98" THEN
    WRITE "Updating your Novell Client Win98"
    #\\cougar-1\sys\public\clients\win95\ibm_enu\acu.exe
    IF "%ERROR_LEVEL" = "1" THEN BEGIN
    EXIT
    END
    END
    If PLATFORM = "WNT" THEN
    WRITE "Updating your Novell Client XP"
    #\\cougar-1\sys\public\clients\winnt\i386\acu.exe
    IF "%ERROR_LEVEL" = "1" THEN BEGIN
    EXIT
    END
    END
    PAUSE

    --
    Hamish Speirs
    Novell Support Forums Volunteer Sysop.

    http://haitch.net

    (Please, no email unless requested. Unsolicited support emails will
    probably be ignored)
  • Thanks for pointing out my errors. It works fine now.
  • kruseb,

    > Thanks for pointing out my errors. It works fine now.


    Good to hear - sometimes it just takes a second pair of eyes.


    --
    Hamish Speirs
    Novell Support Forums Volunteer Sysop.

    http://haitch.net

    (Please, no email unless requested. Unsolicited support emails will
    probably be ignored)
  • kruseb,

    > Thanks for pointing out my errors. It works fine now.


    Good to hear - sometimes it just takes a second pair of eyes.


    --
    Hamish Speirs
    Novell Support Forums Volunteer Sysop.

    http://haitch.net

    (Please, no email unless requested. Unsolicited support emails will
    probably be ignored)