[RESOLVED] Script problems
Results 1 to 3 of 3

Thread: [RESOLVED] Script problems

  1. #1
    thicks
    Guest

    Angry Script problems

    This is the first part of my script and at the end of this section it is cancelling out of the rest. Can anyone tell me why my script is not completing.

    I would really appreciate the help

    IF @WKSTA="TWEETY" OR @WKSTA="MARVIN"
    goto next
    ELSE
    IF EXIST("c:\windows\explorer.exe")
    $kixcheck = -1
    $kixcheck = comparefiletimes("c:\windows\kix32.exe","\\spike\n etlogon\kix32.exe")
    MESSAGEBOX("Kixcheck value = " + $kixcheck,"Kixnumber",0)
    IF $kixcheck <> 0
    copy "\\spike\netlogon\kix32.exe" "c:\windows"
    copy "\\spike\netlogon\kx16.dll" "c:\windows"
    copy "\\spike\netlogon\kx32.dll" "c:\windows"
    ELSE
    ENDIF
    ELSE
    IF EXIST("c:\winnt\explorer.exe")
    $kixcheck = -1
    $kixcheck = comparefiletimes("c:\winnt\kix32.exe","\\spike\net logon\kix32.exe")
    ? $kixcheck
    MESSAGEBOX("Kixcheck value = " + $kixcheck,"Kixnumber",0)
    IF $kixcheck <> 0
    copy "\\spike\netlogon\kix32.exe" "c:\winnt"
    copy "\\spike\netlogon\kx16.dll" "c:\winnt"
    copy "\\spike\netlogon\kx32.dll" "c:\winnt"
    ELSE
    ENDIF
    ELSE
    ENDIF

  2. #2
    NooToo
    Guest

    Post

    If you indented your scripts when using If statements, you would find it a lot easier to debug! However, count the number of IFS and the number of ENDIFS and you will see the problem!



    ------------------
    Never ever say out loud or even think to yourself near a computer "I'll just do this quickly...."

  3. #3
    Registered User
    Join Date
    Jul 2000
    Location
    Huntington Beach, CA, USA
    Posts
    1,515

    Post

    <font face="Verdana, Arial" size="2">Originally posted by NooToo:
    If you indented your scripts when using If statements, you would find it a lot easier to debug! However, count the number of IFS and the number of ENDIFS and you will see the problem!



    </font>
    Exactly - Also try using section labels and more logical formatting - both of those tips make life easier.

    ------------------
    Death is lighter than a feather - duty heavier than a mountian.
    Death is lighter than a feather - duty heavier than a mountian.

    The answer to your question is: 00110100 00110010

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •