Home
Forums
New posts
Search forums
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
C# Community
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Home
Forums
VB.NET
VB.NET General Discussion
How to check Windows Edition?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="JuggaloBrotha" data-source="post: 4695" data-attributes="member: 13"><p>well here's a function that'll return what type of windows you have (win3.11, 95,98,98se,me,nt4,2000,xp,2003) but not which type of xp (home, pro, corp pro) anywho here's what i got:</p><p></p><p>[code]</p><p>Friend Function GetOSVersion() As String</p><p> Dim strVersion As String</p><p> Select Case Environment.OSVersion.Platform</p><p> Case PlatformID.Win32S</p><p> strVersion = "Windows 3.1"</p><p> Case PlatformID.Win32Windows</p><p> Select Case Environment.OSVersion.Version.Minor</p><p> Case 0</p><p> strVersion = "Windows 95"</p><p> Case 10</p><p> If Environment.OSVersion.Version.Revision.ToString() = "2222A" Then</p><p> strVersion = "Windows 98 Second Edition"</p><p> Else</p><p> strVersion = "Windows 98"</p><p> End If</p><p> Case 90</p><p> strVersion = "Windows ME"</p><p> Case Else</p><p> strVersion = "Unknown"</p><p> End Select</p><p> Case PlatformID.Win32NT</p><p> Select Case Environment.OSVersion.Version.Major</p><p> Case 3</p><p> strVersion = "Windows NT 3.51"</p><p> Case 4</p><p> strVersion = "Windows NT 4.0"</p><p> Case 5</p><p> Select Case Environment.OSVersion.Version.Minor</p><p> Case 0</p><p> strVersion = "Windows 2000"</p><p> Case 1</p><p> strVersion = "Windows XP"</p><p> Case 2</p><p> strVersion = "Windows 2003"</p><p> End Select</p><p> Case Else</p><p> strVersion = "Unknown"</p><p> End Select</p><p> Case PlatformID.WinCE</p><p> strVersion = "Windows CE"</p><p> End Select</p><p> Return strVersion</p><p> End Function</p><p>[/code]</p></blockquote><p></p>
[QUOTE="JuggaloBrotha, post: 4695, member: 13"] well here's a function that'll return what type of windows you have (win3.11, 95,98,98se,me,nt4,2000,xp,2003) but not which type of xp (home, pro, corp pro) anywho here's what i got: [code] Friend Function GetOSVersion() As String Dim strVersion As String Select Case Environment.OSVersion.Platform Case PlatformID.Win32S strVersion = "Windows 3.1" Case PlatformID.Win32Windows Select Case Environment.OSVersion.Version.Minor Case 0 strVersion = "Windows 95" Case 10 If Environment.OSVersion.Version.Revision.ToString() = "2222A" Then strVersion = "Windows 98 Second Edition" Else strVersion = "Windows 98" End If Case 90 strVersion = "Windows ME" Case Else strVersion = "Unknown" End Select Case PlatformID.Win32NT Select Case Environment.OSVersion.Version.Major Case 3 strVersion = "Windows NT 3.51" Case 4 strVersion = "Windows NT 4.0" Case 5 Select Case Environment.OSVersion.Version.Minor Case 0 strVersion = "Windows 2000" Case 1 strVersion = "Windows XP" Case 2 strVersion = "Windows 2003" End Select Case Else strVersion = "Unknown" End Select Case PlatformID.WinCE strVersion = "Windows CE" End Select Return strVersion End Function [/code] [/QUOTE]
Insert quotes…
Verification
Post reply
Home
Forums
VB.NET
VB.NET General Discussion
How to check Windows Edition?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top
Bottom