Hi How can I check if user running my application is running Vista or XP? I need to make it If XP then msgbox "XP" else if Vista then msgbox "Vista" endif
Thanks
Hi How can I check if user running my application is running Vista or XP? I need to make it If XP then msgbox "XP" else if Vista then msgbox "Vista" endif
Thanks
Use System.Environment.OSVersion, http://msdn.microsoft.com/en-us/library/ms724832%28VS.85%29.aspx
Here is the Microsoft KB article on how to do this in C#. The code shouldn't be too hard to translate into VB.NET:
How to determine the Windows version by using Visual C#
Here's a quick attempt at conversion:
Dim osInfo As System.OperatingSystem = System.Environment.OSVersion
Select Case osInfo.Version.Major
Case 5
' Windows 2000 or XP
Case 6
' Windows Vista
End Select