Results 1 to 14 of 14

Thread: Check Operating system version

  1. #1
    jcf Guest

    Check Operating system version

    Hi,

    Is there a way to find out what version of SBS are you running? (i.e. SBS
    Standard, Premium, etc.)
    I want to know if a server is running SBS Standard, Premium, etc.

    Thanks!


  2. #2
    Pegasus \(MVP\) Guest

    Re: Check Operating system version


    "jcf" <jcf@discussions.microsoft.com> wrote in message
    news:6E8D369E-127A-4993-873F-8E7083413A82@microsoft.com...
    > Hi,
    >
    > Is there a way to find out what version of SBS are you running? (i.e. SBS
    > Standard, Premium, etc.)
    > I want to know if a server is running SBS Standard, Premium, etc.
    >
    > Thanks!
    >


    The following batch file will probably tell you. You must remove
    all # characters - their only purpose is to mark the start of each
    line of code.
    #@echo off
    #echo > c:\OSVer.vbs Set OSSet =
    GetObject("winmgmts:{impersonationLevel=impersonate}!//./root/cimv2").ExecQuery("select
    caption, CSDVersion, SerialNumber from Win32_OperatingSystem")
    #echo >>c:\OSVer.vbs For Each OS In OSSet
    #echo >>c:\OSVer.vbs wscript.echo "OS=" ^& OS.Caption
    #echo >>c:\OSVer.vbs wscript.echo "SP=" ^& OS.CSDVersion
    #echo >>c:\OSVer.vbs wscript.echo "Product ID=" ^& OS.SerialNumber
    #echo >>c:\OSVer.vbs Next
    #cscript //nologo c:\OSVer.vbs
    #del c:\OSVer.vbs



  3. #3
    jcf Guest

    Re: Check Operating system version

    Do i just copy the code to NOTEPAD. then save it?. then run it?
    How do i get the info?

    thanks.

    "Pegasus (MVP)" wrote:

    >
    > "jcf" <jcf@discussions.microsoft.com> wrote in message
    > news:6E8D369E-127A-4993-873F-8E7083413A82@microsoft.com...
    > > Hi,
    > >
    > > Is there a way to find out what version of SBS are you running? (i.e. SBS
    > > Standard, Premium, etc.)
    > > I want to know if a server is running SBS Standard, Premium, etc.
    > >
    > > Thanks!
    > >

    >
    > The following batch file will probably tell you. You must remove
    > all # characters - their only purpose is to mark the start of each
    > line of code.
    > #@echo off
    > #echo > c:\OSVer.vbs Set OSSet =
    > GetObject("winmgmts:{impersonationLevel=impersonate}!//./root/cimv2").ExecQuery("select
    > caption, CSDVersion, SerialNumber from Win32_OperatingSystem")
    > #echo >>c:\OSVer.vbs For Each OS In OSSet
    > #echo >>c:\OSVer.vbs wscript.echo "OS=" ^& OS.Caption
    > #echo >>c:\OSVer.vbs wscript.echo "SP=" ^& OS.CSDVersion
    > #echo >>c:\OSVer.vbs wscript.echo "Product ID=" ^& OS.SerialNumber
    > #echo >>c:\OSVer.vbs Next
    > #cscript //nologo c:\OSVer.vbs
    > #del c:\OSVer.vbs
    >
    >
    >


  4. #4
    Pegasus \(MVP\) Guest

    Re: Check Operating system version

    As will all batch files, you must save it to a ".bat" file
    before you can run it.


    "jcf" <jcf@discussions.microsoft.com> wrote in message
    news:B6C0AA65-E75F-4F03-B8E0-A408882BAB78@microsoft.com...
    > Do i just copy the code to NOTEPAD. then save it?. then run it?
    > How do i get the info?
    >
    > thanks.
    >
    > "Pegasus (MVP)" wrote:
    >
    >>
    >> "jcf" <jcf@discussions.microsoft.com> wrote in message
    >> news:6E8D369E-127A-4993-873F-8E7083413A82@microsoft.com...
    >> > Hi,
    >> >
    >> > Is there a way to find out what version of SBS are you running? (i.e.
    >> > SBS
    >> > Standard, Premium, etc.)
    >> > I want to know if a server is running SBS Standard, Premium, etc.
    >> >
    >> > Thanks!
    >> >

    >>
    >> The following batch file will probably tell you. You must remove
    >> all # characters - their only purpose is to mark the start of each
    >> line of code.
    >> #@echo off
    >> #echo > c:\OSVer.vbs Set OSSet =
    >> GetObject("winmgmts:{impersonationLevel=impersonate}!//./root/cimv2").ExecQuery("select
    >> caption, CSDVersion, SerialNumber from Win32_OperatingSystem")
    >> #echo >>c:\OSVer.vbs For Each OS In OSSet
    >> #echo >>c:\OSVer.vbs wscript.echo "OS=" ^& OS.Caption
    >> #echo >>c:\OSVer.vbs wscript.echo "SP=" ^& OS.CSDVersion
    >> #echo >>c:\OSVer.vbs wscript.echo "Product ID=" ^& OS.SerialNumber
    >> #echo >>c:\OSVer.vbs Next
    >> #cscript //nologo c:\OSVer.vbs
    >> #del c:\OSVer.vbs
    >>
    >>
    >>




  5. #5
    jcf Guest

    Re: Check Operating system version

    i know that.
    but when i run it..it just flashes.
    and when i run it in CMD ..it gives me errors.

    how do i get it to run properly?

    thanks

    "Pegasus (MVP)" wrote:

    > As will all batch files, you must save it to a ".bat" file
    > before you can run it.
    >
    >
    > "jcf" <jcf@discussions.microsoft.com> wrote in message
    > news:B6C0AA65-E75F-4F03-B8E0-A408882BAB78@microsoft.com...
    > > Do i just copy the code to NOTEPAD. then save it?. then run it?
    > > How do i get the info?
    > >
    > > thanks.
    > >
    > > "Pegasus (MVP)" wrote:
    > >
    > >>
    > >> "jcf" <jcf@discussions.microsoft.com> wrote in message
    > >> news:6E8D369E-127A-4993-873F-8E7083413A82@microsoft.com...
    > >> > Hi,
    > >> >
    > >> > Is there a way to find out what version of SBS are you running? (i.e.
    > >> > SBS
    > >> > Standard, Premium, etc.)
    > >> > I want to know if a server is running SBS Standard, Premium, etc.
    > >> >
    > >> > Thanks!
    > >> >
    > >>
    > >> The following batch file will probably tell you. You must remove
    > >> all # characters - their only purpose is to mark the start of each
    > >> line of code.
    > >> #@echo off
    > >> #echo > c:\OSVer.vbs Set OSSet =
    > >> GetObject("winmgmts:{impersonationLevel=impersonate}!//./root/cimv2").ExecQuery("select
    > >> caption, CSDVersion, SerialNumber from Win32_OperatingSystem")
    > >> #echo >>c:\OSVer.vbs For Each OS In OSSet
    > >> #echo >>c:\OSVer.vbs wscript.echo "OS=" ^& OS.Caption
    > >> #echo >>c:\OSVer.vbs wscript.echo "SP=" ^& OS.CSDVersion
    > >> #echo >>c:\OSVer.vbs wscript.echo "Product ID=" ^& OS.SerialNumber
    > >> #echo >>c:\OSVer.vbs Next
    > >> #cscript //nologo c:\OSVer.vbs
    > >> #del c:\OSVer.vbs
    > >>
    > >>
    > >>

    >
    >
    >


  6. #6
    Pegasus \(MVP\) Guest

    Re: Check Operating system version

    How can I tell if you do not quote any error message(s)?
    Remember - I cannot see your machine!


    "jcf" <jcf@discussions.microsoft.com> wrote in message
    news:B1F76ADF-FBC9-47B6-BFE7-5145EED57D3A@microsoft.com...
    >i know that.
    > but when i run it..it just flashes.
    > and when i run it in CMD ..it gives me errors.
    >
    > how do i get it to run properly?
    >
    > thanks
    >
    > "Pegasus (MVP)" wrote:
    >
    >> As will all batch files, you must save it to a ".bat" file
    >> before you can run it.
    >>
    >>
    >> "jcf" <jcf@discussions.microsoft.com> wrote in message
    >> news:B6C0AA65-E75F-4F03-B8E0-A408882BAB78@microsoft.com...
    >> > Do i just copy the code to NOTEPAD. then save it?. then run it?
    >> > How do i get the info?
    >> >
    >> > thanks.
    >> >
    >> > "Pegasus (MVP)" wrote:
    >> >
    >> >>
    >> >> "jcf" <jcf@discussions.microsoft.com> wrote in message
    >> >> news:6E8D369E-127A-4993-873F-8E7083413A82@microsoft.com...
    >> >> > Hi,
    >> >> >
    >> >> > Is there a way to find out what version of SBS are you running?
    >> >> > (i.e.
    >> >> > SBS
    >> >> > Standard, Premium, etc.)
    >> >> > I want to know if a server is running SBS Standard, Premium, etc.
    >> >> >
    >> >> > Thanks!
    >> >> >
    >> >>
    >> >> The following batch file will probably tell you. You must remove
    >> >> all # characters - their only purpose is to mark the start of each
    >> >> line of code.
    >> >> #@echo off
    >> >> #echo > c:\OSVer.vbs Set OSSet =
    >> >> GetObject("winmgmts:{impersonationLevel=impersonate}!//./root/cimv2").ExecQuery("select
    >> >> caption, CSDVersion, SerialNumber from Win32_OperatingSystem")
    >> >> #echo >>c:\OSVer.vbs For Each OS In OSSet
    >> >> #echo >>c:\OSVer.vbs wscript.echo "OS=" ^& OS.Caption
    >> >> #echo >>c:\OSVer.vbs wscript.echo "SP=" ^& OS.CSDVersion
    >> >> #echo >>c:\OSVer.vbs wscript.echo "Product ID=" ^& OS.SerialNumber
    >> >> #echo >>c:\OSVer.vbs Next
    >> >> #cscript //nologo c:\OSVer.vbs
    >> >> #del c:\OSVer.vbs
    >> >>
    >> >>
    >> >>

    >>
    >>
    >>




  7. #7
    jcf Guest

    Re: Check Operating system version

    my bad.
    here's the error:

    when i run it from CMD.

    C:\>os.bat
    'GetObject' is not recognized as an internal or external command, operable
    program or batch file
    'caption' is not recognized as an internal or external command, operable
    program or batch file
    c:\OSVer.vbs(1, 14) Microsoft VBScript compilation error: Syntax error


    thanks.

    "Pegasus (MVP)" wrote:

    > How can I tell if you do not quote any error message(s)?
    > Remember - I cannot see your machine!
    >
    >
    > "jcf" <jcf@discussions.microsoft.com> wrote in message
    > news:B1F76ADF-FBC9-47B6-BFE7-5145EED57D3A@microsoft.com...
    > >i know that.
    > > but when i run it..it just flashes.
    > > and when i run it in CMD ..it gives me errors.
    > >
    > > how do i get it to run properly?
    > >
    > > thanks
    > >
    > > "Pegasus (MVP)" wrote:
    > >
    > >> As will all batch files, you must save it to a ".bat" file
    > >> before you can run it.
    > >>
    > >>
    > >> "jcf" <jcf@discussions.microsoft.com> wrote in message
    > >> news:B6C0AA65-E75F-4F03-B8E0-A408882BAB78@microsoft.com...
    > >> > Do i just copy the code to NOTEPAD. then save it?. then run it?
    > >> > How do i get the info?
    > >> >
    > >> > thanks.
    > >> >
    > >> > "Pegasus (MVP)" wrote:
    > >> >
    > >> >>
    > >> >> "jcf" <jcf@discussions.microsoft.com> wrote in message
    > >> >> news:6E8D369E-127A-4993-873F-8E7083413A82@microsoft.com...
    > >> >> > Hi,
    > >> >> >
    > >> >> > Is there a way to find out what version of SBS are you running?
    > >> >> > (i.e.
    > >> >> > SBS
    > >> >> > Standard, Premium, etc.)
    > >> >> > I want to know if a server is running SBS Standard, Premium, etc.
    > >> >> >
    > >> >> > Thanks!
    > >> >> >
    > >> >>
    > >> >> The following batch file will probably tell you. You must remove
    > >> >> all # characters - their only purpose is to mark the start of each
    > >> >> line of code.
    > >> >> #@echo off
    > >> >> #echo > c:\OSVer.vbs Set OSSet =
    > >> >> GetObject("winmgmts:{impersonationLevel=impersonate}!//./root/cimv2").ExecQuery("select
    > >> >> caption, CSDVersion, SerialNumber from Win32_OperatingSystem")
    > >> >> #echo >>c:\OSVer.vbs For Each OS In OSSet
    > >> >> #echo >>c:\OSVer.vbs wscript.echo "OS=" ^& OS.Caption
    > >> >> #echo >>c:\OSVer.vbs wscript.echo "SP=" ^& OS.CSDVersion
    > >> >> #echo >>c:\OSVer.vbs wscript.echo "Product ID=" ^& OS.SerialNumber
    > >> >> #echo >>c:\OSVer.vbs Next
    > >> >> #cscript //nologo c:\OSVer.vbs
    > >> >> #del c:\OSVer.vbs
    > >> >>
    > >> >>
    > >> >>
    > >>
    > >>
    > >>

    >
    >
    >


  8. #8
    Pegasus \(MVP\) Guest

    Re: Check Operating system version

    You did not unwrap the lines as I said in my first post.
    Remember - each line in my code starts with a # character!



    "jcf" <jcf@discussions.microsoft.com> wrote in message
    news:9B9FB0F8-330D-4FA3-AFC0-B41383890B3A@microsoft.com...
    > my bad.
    > here's the error:
    >
    > when i run it from CMD.
    >
    > C:\>os.bat
    > 'GetObject' is not recognized as an internal or external command, operable
    > program or batch file
    > 'caption' is not recognized as an internal or external command, operable
    > program or batch file
    > c:\OSVer.vbs(1, 14) Microsoft VBScript compilation error: Syntax error
    >
    >
    > thanks.
    >
    > "Pegasus (MVP)" wrote:
    >
    >> How can I tell if you do not quote any error message(s)?
    >> Remember - I cannot see your machine!
    >>
    >>
    >> "jcf" <jcf@discussions.microsoft.com> wrote in message
    >> news:B1F76ADF-FBC9-47B6-BFE7-5145EED57D3A@microsoft.com...
    >> >i know that.
    >> > but when i run it..it just flashes.
    >> > and when i run it in CMD ..it gives me errors.
    >> >
    >> > how do i get it to run properly?
    >> >
    >> > thanks
    >> >
    >> > "Pegasus (MVP)" wrote:
    >> >
    >> >> As will all batch files, you must save it to a ".bat" file
    >> >> before you can run it.
    >> >>
    >> >>
    >> >> "jcf" <jcf@discussions.microsoft.com> wrote in message
    >> >> news:B6C0AA65-E75F-4F03-B8E0-A408882BAB78@microsoft.com...
    >> >> > Do i just copy the code to NOTEPAD. then save it?. then run it?
    >> >> > How do i get the info?
    >> >> >
    >> >> > thanks.
    >> >> >
    >> >> > "Pegasus (MVP)" wrote:
    >> >> >
    >> >> >>
    >> >> >> "jcf" <jcf@discussions.microsoft.com> wrote in message
    >> >> >> news:6E8D369E-127A-4993-873F-8E7083413A82@microsoft.com...
    >> >> >> > Hi,
    >> >> >> >
    >> >> >> > Is there a way to find out what version of SBS are you running?
    >> >> >> > (i.e.
    >> >> >> > SBS
    >> >> >> > Standard, Premium, etc.)
    >> >> >> > I want to know if a server is running SBS Standard, Premium, etc.
    >> >> >> >
    >> >> >> > Thanks!
    >> >> >> >
    >> >> >>
    >> >> >> The following batch file will probably tell you. You must remove
    >> >> >> all # characters - their only purpose is to mark the start of each
    >> >> >> line of code.
    >> >> >> #@echo off
    >> >> >> #echo > c:\OSVer.vbs Set OSSet =
    >> >> >> GetObject("winmgmts:{impersonationLevel=impersonate}!//./root/cimv2").ExecQuery("select
    >> >> >> caption, CSDVersion, SerialNumber from Win32_OperatingSystem")
    >> >> >> #echo >>c:\OSVer.vbs For Each OS In OSSet
    >> >> >> #echo >>c:\OSVer.vbs wscript.echo "OS=" ^& OS.Caption
    >> >> >> #echo >>c:\OSVer.vbs wscript.echo "SP=" ^& OS.CSDVersion
    >> >> >> #echo >>c:\OSVer.vbs wscript.echo "Product ID=" ^& OS.SerialNumber
    >> >> >> #echo >>c:\OSVer.vbs Next
    >> >> >> #cscript //nologo c:\OSVer.vbs
    >> >> >> #del c:\OSVer.vbs
    >> >> >>
    >> >> >>
    >> >> >>
    >> >>
    >> >>
    >> >>

    >>
    >>
    >>




  9. #9
    jcf Guest

    Re: Check Operating system version

    i did unwrap them!

    this is what i have on os.bat

    @echo off

    echo > c:\OSVer.vbs Set OSSet =
    GetObject("winmgmts:{impersonationLevel=impersonate}!//./root/cimv2").ExecQuery("select
    caption, CSDVersion, SerialNumber from Win32_OperatingSystem")

    echo >>c:\OSVer.vbs For Each OS In OSSet

    echo >>c:\OSVer.vbs wscript.echo "OS=" ^& OS.Caption

    echo >>c:\OSVer.vbs wscript.echo "SP=" ^& OS.CSDVersion

    echo >>c:\OSVer.vbs wscript.echo "Product ID=" ^& OS.SerialNumber

    echo >>c:\OSVer.vbs Next

    cscript //nologo c:\OSVer.vbs

    del c:\OSVer.vbs

    what now?

    "Pegasus (MVP)" wrote:

    > You did not unwrap the lines as I said in my first post.
    > Remember - each line in my code starts with a # character!
    >
    >
    >
    > "jcf" <jcf@discussions.microsoft.com> wrote in message
    > news:9B9FB0F8-330D-4FA3-AFC0-B41383890B3A@microsoft.com...
    > > my bad.
    > > here's the error:
    > >
    > > when i run it from CMD.
    > >
    > > C:\>os.bat
    > > 'GetObject' is not recognized as an internal or external command, operable
    > > program or batch file
    > > 'caption' is not recognized as an internal or external command, operable
    > > program or batch file
    > > c:\OSVer.vbs(1, 14) Microsoft VBScript compilation error: Syntax error
    > >
    > >
    > > thanks.
    > >
    > > "Pegasus (MVP)" wrote:
    > >
    > >> How can I tell if you do not quote any error message(s)?
    > >> Remember - I cannot see your machine!
    > >>
    > >>
    > >> "jcf" <jcf@discussions.microsoft.com> wrote in message
    > >> news:B1F76ADF-FBC9-47B6-BFE7-5145EED57D3A@microsoft.com...
    > >> >i know that.
    > >> > but when i run it..it just flashes.
    > >> > and when i run it in CMD ..it gives me errors.
    > >> >
    > >> > how do i get it to run properly?
    > >> >
    > >> > thanks
    > >> >
    > >> > "Pegasus (MVP)" wrote:
    > >> >
    > >> >> As will all batch files, you must save it to a ".bat" file
    > >> >> before you can run it.
    > >> >>
    > >> >>
    > >> >> "jcf" <jcf@discussions.microsoft.com> wrote in message
    > >> >> news:B6C0AA65-E75F-4F03-B8E0-A408882BAB78@microsoft.com...
    > >> >> > Do i just copy the code to NOTEPAD. then save it?. then run it?
    > >> >> > How do i get the info?
    > >> >> >
    > >> >> > thanks.
    > >> >> >
    > >> >> > "Pegasus (MVP)" wrote:
    > >> >> >
    > >> >> >>
    > >> >> >> "jcf" <jcf@discussions.microsoft.com> wrote in message
    > >> >> >> news:6E8D369E-127A-4993-873F-8E7083413A82@microsoft.com...
    > >> >> >> > Hi,
    > >> >> >> >
    > >> >> >> > Is there a way to find out what version of SBS are you running?
    > >> >> >> > (i.e.
    > >> >> >> > SBS
    > >> >> >> > Standard, Premium, etc.)
    > >> >> >> > I want to know if a server is running SBS Standard, Premium, etc.
    > >> >> >> >
    > >> >> >> > Thanks!
    > >> >> >> >
    > >> >> >>
    > >> >> >> The following batch file will probably tell you. You must remove
    > >> >> >> all # characters - their only purpose is to mark the start of each
    > >> >> >> line of code.
    > >> >> >> #@echo off
    > >> >> >> #echo > c:\OSVer.vbs Set OSSet =
    > >> >> >> GetObject("winmgmts:{impersonationLevel=impersonate}!//./root/cimv2").ExecQuery("select
    > >> >> >> caption, CSDVersion, SerialNumber from Win32_OperatingSystem")
    > >> >> >> #echo >>c:\OSVer.vbs For Each OS In OSSet
    > >> >> >> #echo >>c:\OSVer.vbs wscript.echo "OS=" ^& OS.Caption
    > >> >> >> #echo >>c:\OSVer.vbs wscript.echo "SP=" ^& OS.CSDVersion
    > >> >> >> #echo >>c:\OSVer.vbs wscript.echo "Product ID=" ^& OS.SerialNumber
    > >> >> >> #echo >>c:\OSVer.vbs Next
    > >> >> >> #cscript //nologo c:\OSVer.vbs
    > >> >> >> #del c:\OSVer.vbs
    > >> >> >>
    > >> >> >>
    > >> >> >>
    > >> >>
    > >> >>
    > >> >>
    > >>
    > >>
    > >>

    >
    >
    >


  10. #10
    Pegasus \(MVP\) Guest

    Re: Check Operating system version

    The first line says "@echo off".

    The second line starts with "echo" and ends with 'OperatingSystem")'.
    It is a very, very long line. The error messages you reported tell
    me that you broke it up into several separate lines. The code will
    never work unless you unwrap this line correctly.

    If you find it difficult to unwrap the lines correctly, use the attached
    and renamed zip file. You may have to instruct your news reader
    to accept attachments.



    "jcf" <jcf@discussions.microsoft.com> wrote in message
    news:ABD0D440-98E2-42C5-BF1D-EAC6445402FC@microsoft.com...
    >i did unwrap them!
    >
    > this is what i have on os.bat
    >
    > @echo off
    >
    > echo > c:\OSVer.vbs Set OSSet =
    > GetObject("winmgmts:{impersonationLevel=impersonate}!//./root/cimv2").ExecQuery("select
    > caption, CSDVersion, SerialNumber from Win32_OperatingSystem")
    >
    > echo >>c:\OSVer.vbs For Each OS In OSSet
    >
    > echo >>c:\OSVer.vbs wscript.echo "OS=" ^& OS.Caption
    >
    > echo >>c:\OSVer.vbs wscript.echo "SP=" ^& OS.CSDVersion
    >
    > echo >>c:\OSVer.vbs wscript.echo "Product ID=" ^& OS.SerialNumber
    >
    > echo >>c:\OSVer.vbs Next
    >
    > cscript //nologo c:\OSVer.vbs
    >
    > del c:\OSVer.vbs
    >
    > what now?
    >
    > "Pegasus (MVP)" wrote:
    >
    >> You did not unwrap the lines as I said in my first post.
    >> Remember - each line in my code starts with a # character!
    >>
    >>
    >>
    >> "jcf" <jcf@discussions.microsoft.com> wrote in message
    >> news:9B9FB0F8-330D-4FA3-AFC0-B41383890B3A@microsoft.com...
    >> > my bad.
    >> > here's the error:
    >> >
    >> > when i run it from CMD.
    >> >
    >> > C:\>os.bat
    >> > 'GetObject' is not recognized as an internal or external command,
    >> > operable
    >> > program or batch file
    >> > 'caption' is not recognized as an internal or external command,
    >> > operable
    >> > program or batch file
    >> > c:\OSVer.vbs(1, 14) Microsoft VBScript compilation error: Syntax error
    >> >
    >> >
    >> > thanks.
    >> >
    >> > "Pegasus (MVP)" wrote:
    >> >
    >> >> How can I tell if you do not quote any error message(s)?
    >> >> Remember - I cannot see your machine!
    >> >>
    >> >>
    >> >> "jcf" <jcf@discussions.microsoft.com> wrote in message
    >> >> news:B1F76ADF-FBC9-47B6-BFE7-5145EED57D3A@microsoft.com...
    >> >> >i know that.
    >> >> > but when i run it..it just flashes.
    >> >> > and when i run it in CMD ..it gives me errors.
    >> >> >
    >> >> > how do i get it to run properly?
    >> >> >
    >> >> > thanks
    >> >> >
    >> >> > "Pegasus (MVP)" wrote:
    >> >> >
    >> >> >> As will all batch files, you must save it to a ".bat" file
    >> >> >> before you can run it.
    >> >> >>
    >> >> >>
    >> >> >> "jcf" <jcf@discussions.microsoft.com> wrote in message
    >> >> >> news:B6C0AA65-E75F-4F03-B8E0-A408882BAB78@microsoft.com...
    >> >> >> > Do i just copy the code to NOTEPAD. then save it?. then run it?
    >> >> >> > How do i get the info?
    >> >> >> >
    >> >> >> > thanks.
    >> >> >> >
    >> >> >> > "Pegasus (MVP)" wrote:
    >> >> >> >
    >> >> >> >>
    >> >> >> >> "jcf" <jcf@discussions.microsoft.com> wrote in message
    >> >> >> >> news:6E8D369E-127A-4993-873F-8E7083413A82@microsoft.com...
    >> >> >> >> > Hi,
    >> >> >> >> >
    >> >> >> >> > Is there a way to find out what version of SBS are you
    >> >> >> >> > running?
    >> >> >> >> > (i.e.
    >> >> >> >> > SBS
    >> >> >> >> > Standard, Premium, etc.)
    >> >> >> >> > I want to know if a server is running SBS Standard, Premium,
    >> >> >> >> > etc.
    >> >> >> >> >
    >> >> >> >> > Thanks!
    >> >> >> >> >
    >> >> >> >>
    >> >> >> >> The following batch file will probably tell you. You must remove
    >> >> >> >> all # characters - their only purpose is to mark the start of
    >> >> >> >> each
    >> >> >> >> line of code.
    >> >> >> >> #@echo off
    >> >> >> >> #echo > c:\OSVer.vbs Set OSSet =
    >> >> >> >> GetObject("winmgmts:{impersonationLevel=impersonate}!//./root/cimv2").ExecQuery("select
    >> >> >> >> caption, CSDVersion, SerialNumber from Win32_OperatingSystem")
    >> >> >> >> #echo >>c:\OSVer.vbs For Each OS In OSSet
    >> >> >> >> #echo >>c:\OSVer.vbs wscript.echo "OS=" ^& OS.Caption
    >> >> >> >> #echo >>c:\OSVer.vbs wscript.echo "SP=" ^& OS.CSDVersion
    >> >> >> >> #echo >>c:\OSVer.vbs wscript.echo "Product ID=" ^&
    >> >> >> >> OS.SerialNumber
    >> >> >> >> #echo >>c:\OSVer.vbs Next
    >> >> >> >> #cscript //nologo c:\OSVer.vbs
    >> >> >> >> #del c:\OSVer.vbs
    >> >> >> >>
    >> >> >> >>
    >> >> >> >>
    >> >> >>
    >> >> >>
    >> >> >>
    >> >>
    >> >>
    >> >>

    >>
    >>
    >>






  11. #11
    jcf Guest

    Re: Check Operating system version

    it worked!..

    thanks.

    "Pegasus (MVP)" wrote:

    > The first line says "@echo off".
    >
    > The second line starts with "echo" and ends with 'OperatingSystem")'.
    > It is a very, very long line. The error messages you reported tell
    > me that you broke it up into several separate lines. The code will
    > never work unless you unwrap this line correctly.
    >
    > If you find it difficult to unwrap the lines correctly, use the attached
    > and renamed zip file. You may have to instruct your news reader
    > to accept attachments.
    >
    >
    >
    > "jcf" <jcf@discussions.microsoft.com> wrote in message
    > news:ABD0D440-98E2-42C5-BF1D-EAC6445402FC@microsoft.com...
    > >i did unwrap them!
    > >
    > > this is what i have on os.bat
    > >
    > > @echo off
    > >
    > > echo > c:\OSVer.vbs Set OSSet =
    > > GetObject("winmgmts:{impersonationLevel=impersonate}!//./root/cimv2").ExecQuery("select
    > > caption, CSDVersion, SerialNumber from Win32_OperatingSystem")
    > >
    > > echo >>c:\OSVer.vbs For Each OS In OSSet
    > >
    > > echo >>c:\OSVer.vbs wscript.echo "OS=" ^& OS.Caption
    > >
    > > echo >>c:\OSVer.vbs wscript.echo "SP=" ^& OS.CSDVersion
    > >
    > > echo >>c:\OSVer.vbs wscript.echo "Product ID=" ^& OS.SerialNumber
    > >
    > > echo >>c:\OSVer.vbs Next
    > >
    > > cscript //nologo c:\OSVer.vbs
    > >
    > > del c:\OSVer.vbs
    > >
    > > what now?
    > >
    > > "Pegasus (MVP)" wrote:
    > >
    > >> You did not unwrap the lines as I said in my first post.
    > >> Remember - each line in my code starts with a # character!
    > >>
    > >>
    > >>
    > >> "jcf" <jcf@discussions.microsoft.com> wrote in message
    > >> news:9B9FB0F8-330D-4FA3-AFC0-B41383890B3A@microsoft.com...
    > >> > my bad.
    > >> > here's the error:
    > >> >
    > >> > when i run it from CMD.
    > >> >
    > >> > C:\>os.bat
    > >> > 'GetObject' is not recognized as an internal or external command,
    > >> > operable
    > >> > program or batch file
    > >> > 'caption' is not recognized as an internal or external command,
    > >> > operable
    > >> > program or batch file
    > >> > c:\OSVer.vbs(1, 14) Microsoft VBScript compilation error: Syntax error
    > >> >
    > >> >
    > >> > thanks.
    > >> >
    > >> > "Pegasus (MVP)" wrote:
    > >> >
    > >> >> How can I tell if you do not quote any error message(s)?
    > >> >> Remember - I cannot see your machine!
    > >> >>
    > >> >>
    > >> >> "jcf" <jcf@discussions.microsoft.com> wrote in message
    > >> >> news:B1F76ADF-FBC9-47B6-BFE7-5145EED57D3A@microsoft.com...
    > >> >> >i know that.
    > >> >> > but when i run it..it just flashes.
    > >> >> > and when i run it in CMD ..it gives me errors.
    > >> >> >
    > >> >> > how do i get it to run properly?
    > >> >> >
    > >> >> > thanks
    > >> >> >
    > >> >> > "Pegasus (MVP)" wrote:
    > >> >> >
    > >> >> >> As will all batch files, you must save it to a ".bat" file
    > >> >> >> before you can run it.
    > >> >> >>
    > >> >> >>
    > >> >> >> "jcf" <jcf@discussions.microsoft.com> wrote in message
    > >> >> >> news:B6C0AA65-E75F-4F03-B8E0-A408882BAB78@microsoft.com...
    > >> >> >> > Do i just copy the code to NOTEPAD. then save it?. then run it?
    > >> >> >> > How do i get the info?
    > >> >> >> >
    > >> >> >> > thanks.
    > >> >> >> >
    > >> >> >> > "Pegasus (MVP)" wrote:
    > >> >> >> >
    > >> >> >> >>
    > >> >> >> >> "jcf" <jcf@discussions.microsoft.com> wrote in message
    > >> >> >> >> news:6E8D369E-127A-4993-873F-8E7083413A82@microsoft.com...
    > >> >> >> >> > Hi,
    > >> >> >> >> >
    > >> >> >> >> > Is there a way to find out what version of SBS are you
    > >> >> >> >> > running?
    > >> >> >> >> > (i.e.
    > >> >> >> >> > SBS
    > >> >> >> >> > Standard, Premium, etc.)
    > >> >> >> >> > I want to know if a server is running SBS Standard, Premium,
    > >> >> >> >> > etc.
    > >> >> >> >> >
    > >> >> >> >> > Thanks!
    > >> >> >> >> >
    > >> >> >> >>
    > >> >> >> >> The following batch file will probably tell you. You must remove
    > >> >> >> >> all # characters - their only purpose is to mark the start of
    > >> >> >> >> each
    > >> >> >> >> line of code.
    > >> >> >> >> #@echo off
    > >> >> >> >> #echo > c:\OSVer.vbs Set OSSet =
    > >> >> >> >> GetObject("winmgmts:{impersonationLevel=impersonate}!//./root/cimv2").ExecQuery("select
    > >> >> >> >> caption, CSDVersion, SerialNumber from Win32_OperatingSystem")
    > >> >> >> >> #echo >>c:\OSVer.vbs For Each OS In OSSet
    > >> >> >> >> #echo >>c:\OSVer.vbs wscript.echo "OS=" ^& OS.Caption
    > >> >> >> >> #echo >>c:\OSVer.vbs wscript.echo "SP=" ^& OS.CSDVersion
    > >> >> >> >> #echo >>c:\OSVer.vbs wscript.echo "Product ID=" ^&
    > >> >> >> >> OS.SerialNumber
    > >> >> >> >> #echo >>c:\OSVer.vbs Next
    > >> >> >> >> #cscript //nologo c:\OSVer.vbs
    > >> >> >> >> #del c:\OSVer.vbs
    > >> >> >> >>
    > >> >> >> >>
    > >> >> >> >>
    > >> >> >>
    > >> >> >>
    > >> >> >>
    > >> >>
    > >> >>
    > >> >>
    > >>
    > >>
    > >>

    >
    >
    >


  12. #12
    jcf Guest

    Re: Check Operating system version

    the code worked but i didnt really get what i was looking for.
    when i ran the bat on the server.
    it just said windows server 2003 for small business server, sp2, product id
    = xxxxx...

    - what i wanted was, to know what edition of sbs is running.. standard,
    premium??

    thanks.

    "Pegasus (MVP)" wrote:

    > The first line says "@echo off".
    >
    > The second line starts with "echo" and ends with 'OperatingSystem")'.
    > It is a very, very long line. The error messages you reported tell
    > me that you broke it up into several separate lines. The code will
    > never work unless you unwrap this line correctly.
    >
    > If you find it difficult to unwrap the lines correctly, use the attached
    > and renamed zip file. You may have to instruct your news reader
    > to accept attachments.
    >
    >
    >
    > "jcf" <jcf@discussions.microsoft.com> wrote in message
    > news:ABD0D440-98E2-42C5-BF1D-EAC6445402FC@microsoft.com...
    > >i did unwrap them!
    > >
    > > this is what i have on os.bat
    > >
    > > @echo off
    > >
    > > echo > c:\OSVer.vbs Set OSSet =
    > > GetObject("winmgmts:{impersonationLevel=impersonate}!//./root/cimv2").ExecQuery("select
    > > caption, CSDVersion, SerialNumber from Win32_OperatingSystem")
    > >
    > > echo >>c:\OSVer.vbs For Each OS In OSSet
    > >
    > > echo >>c:\OSVer.vbs wscript.echo "OS=" ^& OS.Caption
    > >
    > > echo >>c:\OSVer.vbs wscript.echo "SP=" ^& OS.CSDVersion
    > >
    > > echo >>c:\OSVer.vbs wscript.echo "Product ID=" ^& OS.SerialNumber
    > >
    > > echo >>c:\OSVer.vbs Next
    > >
    > > cscript //nologo c:\OSVer.vbs
    > >
    > > del c:\OSVer.vbs
    > >
    > > what now?
    > >
    > > "Pegasus (MVP)" wrote:
    > >
    > >> You did not unwrap the lines as I said in my first post.
    > >> Remember - each line in my code starts with a # character!
    > >>
    > >>
    > >>
    > >> "jcf" <jcf@discussions.microsoft.com> wrote in message
    > >> news:9B9FB0F8-330D-4FA3-AFC0-B41383890B3A@microsoft.com...
    > >> > my bad.
    > >> > here's the error:
    > >> >
    > >> > when i run it from CMD.
    > >> >
    > >> > C:\>os.bat
    > >> > 'GetObject' is not recognized as an internal or external command,
    > >> > operable
    > >> > program or batch file
    > >> > 'caption' is not recognized as an internal or external command,
    > >> > operable
    > >> > program or batch file
    > >> > c:\OSVer.vbs(1, 14) Microsoft VBScript compilation error: Syntax error
    > >> >
    > >> >
    > >> > thanks.
    > >> >
    > >> > "Pegasus (MVP)" wrote:
    > >> >
    > >> >> How can I tell if you do not quote any error message(s)?
    > >> >> Remember - I cannot see your machine!
    > >> >>
    > >> >>
    > >> >> "jcf" <jcf@discussions.microsoft.com> wrote in message
    > >> >> news:B1F76ADF-FBC9-47B6-BFE7-5145EED57D3A@microsoft.com...
    > >> >> >i know that.
    > >> >> > but when i run it..it just flashes.
    > >> >> > and when i run it in CMD ..it gives me errors.
    > >> >> >
    > >> >> > how do i get it to run properly?
    > >> >> >
    > >> >> > thanks
    > >> >> >
    > >> >> > "Pegasus (MVP)" wrote:
    > >> >> >
    > >> >> >> As will all batch files, you must save it to a ".bat" file
    > >> >> >> before you can run it.
    > >> >> >>
    > >> >> >>
    > >> >> >> "jcf" <jcf@discussions.microsoft.com> wrote in message
    > >> >> >> news:B6C0AA65-E75F-4F03-B8E0-A408882BAB78@microsoft.com...
    > >> >> >> > Do i just copy the code to NOTEPAD. then save it?. then run it?
    > >> >> >> > How do i get the info?
    > >> >> >> >
    > >> >> >> > thanks.
    > >> >> >> >
    > >> >> >> > "Pegasus (MVP)" wrote:
    > >> >> >> >
    > >> >> >> >>
    > >> >> >> >> "jcf" <jcf@discussions.microsoft.com> wrote in message
    > >> >> >> >> news:6E8D369E-127A-4993-873F-8E7083413A82@microsoft.com...
    > >> >> >> >> > Hi,
    > >> >> >> >> >
    > >> >> >> >> > Is there a way to find out what version of SBS are you
    > >> >> >> >> > running?
    > >> >> >> >> > (i.e.
    > >> >> >> >> > SBS
    > >> >> >> >> > Standard, Premium, etc.)
    > >> >> >> >> > I want to know if a server is running SBS Standard, Premium,
    > >> >> >> >> > etc.
    > >> >> >> >> >
    > >> >> >> >> > Thanks!
    > >> >> >> >> >
    > >> >> >> >>
    > >> >> >> >> The following batch file will probably tell you. You must remove
    > >> >> >> >> all # characters - their only purpose is to mark the start of
    > >> >> >> >> each
    > >> >> >> >> line of code.
    > >> >> >> >> #@echo off
    > >> >> >> >> #echo > c:\OSVer.vbs Set OSSet =
    > >> >> >> >> GetObject("winmgmts:{impersonationLevel=impersonate}!//./root/cimv2").ExecQuery("select
    > >> >> >> >> caption, CSDVersion, SerialNumber from Win32_OperatingSystem")
    > >> >> >> >> #echo >>c:\OSVer.vbs For Each OS In OSSet
    > >> >> >> >> #echo >>c:\OSVer.vbs wscript.echo "OS=" ^& OS.Caption
    > >> >> >> >> #echo >>c:\OSVer.vbs wscript.echo "SP=" ^& OS.CSDVersion
    > >> >> >> >> #echo >>c:\OSVer.vbs wscript.echo "Product ID=" ^&
    > >> >> >> >> OS.SerialNumber
    > >> >> >> >> #echo >>c:\OSVer.vbs Next
    > >> >> >> >> #cscript //nologo c:\OSVer.vbs
    > >> >> >> >> #del c:\OSVer.vbs
    > >> >> >> >>
    > >> >> >> >>
    > >> >> >> >>
    > >> >> >>
    > >> >> >>
    > >> >> >>
    > >> >>
    > >> >>
    > >> >>
    > >>
    > >>
    > >>

    >
    >
    >


  13. #13
    Pegasus \(MVP\) Guest

    Re: Check Operating system version


    "jcf" <jcf@discussions.microsoft.com> wrote in message
    news:5CD27E57-546A-4D6C-9966-D490B0297065@microsoft.com...
    > the code worked but i didnt really get what i was looking for.
    > when i ran the bat on the server.
    > it just said windows server 2003 for small business server, sp2, product
    > id
    > = xxxxx...
    >
    > - what i wanted was, to know what edition of sbs is running.. standard,
    > premium??
    >
    > thanks.



    See if you can find the information you're after in here:
    HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion



  14. #14
    jcf Guest

    Re: Check Operating system version

    nope. still not saying any edition of SBS
    just Small Business Server 2003...............

    thanks.

    "Pegasus (MVP)" wrote:

    >
    > "jcf" <jcf@discussions.microsoft.com> wrote in message
    > news:5CD27E57-546A-4D6C-9966-D490B0297065@microsoft.com...
    > > the code worked but i didnt really get what i was looking for.
    > > when i ran the bat on the server.
    > > it just said windows server 2003 for small business server, sp2, product
    > > id
    > > = xxxxx...
    > >
    > > - what i wanted was, to know what edition of sbs is running.. standard,
    > > premium??
    > >
    > > thanks.

    >
    >
    > See if you can find the information you're after in here:
    > HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion
    >
    >
    >


Similar Threads

  1. Replies: 3
    Last Post: 16-05-2012, 03:10 PM
  2. Replies: 5
    Last Post: 05-07-2011, 09:39 PM
  3. Best Linux Operating System version
    By Tamkinath in forum Operating Systems
    Replies: 4
    Last Post: 10-11-2010, 04:34 PM
  4. Replies: 4
    Last Post: 23-09-2010, 08:31 AM
  5. Replies: 3
    Last Post: 25-11-2008, 02:49 PM

Tags for this Thread

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
  •  
Page generated in 1,713,401,015.64070 seconds with 17 queries