Loading ...
Sorry, an error occurred while loading the content.

Net logon solution

Expand Messages
  • Suresh Dookeran
    OK, I figured it out.... My syntax was almost there... you have to enclose the %OS% with Quotation marks: IF %OS% = Windows_nt goto xp etcetera etcetera
    Message 1 of 3 , Oct 31, 2003
    • 0 Attachment
      OK, I figured it out.... My syntax was almost there... you have to enclose the %OS% with Quotation marks:


      IF "%OS%" = "Windows_nt" goto xp

      etcetera etcetera etcetera....

      See what a quotation mark can do? The entire script was going haywire....


      -Suresh
      (c): 684-0669


      [Non-text portions of this message have been removed]
    • Allan Samaroo
      Does it work under win9x??? I tried an echo %OS% and it did not return what it is supposed to. Alter your code like this as a workaround: @echo off IF %OS%
      Message 2 of 3 , Oct 31, 2003
      • 0 Attachment
        Does it work under win9x??? I tried an echo %OS% and it did not return what
        it is supposed to. Alter your code like this as a workaround:

        @echo off
        IF "%OS%" == "Windows_NT" goto xp else goto win9x
        :win9x
        REM win9x commands listed here
        echo Windows 95 based
        goto :end
        :xp
        REM 2000/XP commands listed here
        echo Windows NT based
        goto :end
        :end
        Echo Done...


        Here's a resource for you: http://www.labmice.net/scripting/default.htm

        Allan.


        -----Original Message-----
        From: Suresh Dookeran [mailto:sureshd@...]
        Sent: Friday, October 31, 2003 2:43 PM
        To: TTLUG@yahoogroups.com
        Subject: [TTLUG] Net logon solution


        OK, I figured it out.... My syntax was almost there... you have to enclose
        the %OS% with Quotation marks:


        IF "%OS%" = "Windows_nt" goto xp

        etcetera etcetera etcetera....

        See what a quotation mark can do? The entire script was going haywire....


        -Suresh
        (c): 684-0669
      • Suresh
        Most Helpful... Will try it.. And you re right. 9x doesn t return the %OS% variable - it just came up blank. -Suresh ... From: Allan Samaroo To:
        Message 3 of 3 , Nov 1, 2003
        • 0 Attachment
          Most Helpful... Will try it.. And you're right. 9x doesn't return the %OS% variable - it just came up blank.

          -Suresh
          ----- Original Message -----
          From: Allan Samaroo
          To: TTLUG@yahoogroups.com
          Sent: Friday, October 31, 2003 2:59 PM
          Subject: RE: [TTLUG] Net logon solution


          Does it work under win9x??? I tried an echo %OS% and it did not return what
          it is supposed to. Alter your code like this as a workaround:

          @echo off
          IF "%OS%" == "Windows_NT" goto xp else goto win9x
          :win9x
          REM win9x commands listed here
          echo Windows 95 based
          goto :end
          :xp
          REM 2000/XP commands listed here
          echo Windows NT based
          goto :end
          :end
          Echo Done...


          Here's a resource for you: http://www.labmice.net/scripting/default.htm

          Allan.


          [Non-text portions of this message have been removed]
        Your message has been successfully submitted and would be delivered to recipients shortly.