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!
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!
"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
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
>
>
>
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
>>
>>
>>
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
> >>
> >>
> >>
>
>
>
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
>> >>
>> >>
>> >>
>>
>>
>>
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
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>
>
>
>
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
>> >> >>
>> >> >>
>> >> >>
>> >>
>> >>
>> >>
>>
>>
>>
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
> >> >> >>
> >> >> >>
> >> >> >>
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>
>
>
>
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
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >>
>> >>
>> >>
>>
>>
>>
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
> >> >> >> >>
> >> >> >> >>
> >> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >>
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>
>
>
>
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
> >> >> >> >>
> >> >> >> >>
> >> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >>
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>
>
>
>
"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
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
>
>
>
Bookmarks