Home All Groups Group Topic Archive Search About
Author
8 May 2006 12:25 AM
gene kelley
What is the best way to determine what OS ServicePac is installed on
the user's system?
Can it be determined from the version # as in 5.1.2600.131072 (Happens
to be a WinXP/SP2 system) ?

Thanks,

Gene

Author
8 May 2006 2:02 AM
Brian Henry
I think you can get it through the use of WMI to query the OS and ask the
service pack level


Show quoteHide quote
"gene kelley" <o***@by.me> wrote in message
news:163t52lro5fn2l2t453ar1lhb0nv1ve01j@4ax.com...
> What is the best way to determine what OS ServicePac is installed on
> the user's system?
> Can it be determined from the version # as in 5.1.2600.131072 (Happens
> to be a WinXP/SP2 system) ?
>
> Thanks,
>
> Gene
Author
8 May 2006 3:50 AM
gene kelley
On Sun, 7 May 2006 22:02:45 -0400, "Brian Henry" <nospam@nospam.com>
wrote:

>I think you can get it through the use of WMI to query the OS and ask the
>service pack level
>
>

There are a couple of different "one-liners" in' My.Computer.Info'
that provide some OS info, bu no SP info. I just stumbled across
another method that does yield that info:

       Dim os As OperatingSystem = Environment.OSVersion
           Label1.Text = os.ServicePack
    'Returns  Service Pack 2
    Label2.Text = os.Platform.ToString
    'Returns  Win32NT
    Label3.Text = os.VersionString
    'Returns  Microsoft Windows NT 5.1.2600 Service Pack 2


Thanks,
Gene   



Show quoteHide quote
>"gene kelley" <o***@by.me> wrote in message
>news:163t52lro5fn2l2t453ar1lhb0nv1ve01j@4ax.com...
>> What is the best way to determine what OS ServicePac is installed on
>> the user's system?
>> Can it be determined from the version # as in 5.1.2600.131072 (Happens
>> to be a WinXP/SP2 system) ?
>>
>> Thanks,
>>
>> Gene
>
Author
8 May 2006 9:41 AM
Herfried K. Wagner [MVP]
"gene kelley" <o***@by.me> schrieb:
> What is the best way to determine what OS ServicePac is installed on
> the user's system?

<URL:http://groups.google.de/group/microsoft.public.de.german.entwickler.dotnet.csharp/msg/45be47e364f3d134>

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>