OS ServicePac ?

  • Thread starter Thread starter gene kelley
  • Start date Start date
G

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
 
I think you can get it through the use of WMI to query the OS and ask the
service pack level
 
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
 
Back
Top