Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Option Explicit
Type OSVERSIONINFO
dwOSVersionInfoSize As Long
dwMajorVersion As Long
dwMinorVersion As Long
dwBuildNumber As Long
dwPlatformId As Long
szCSDVersion As String * 128
End Type
Declare Function GetVersionEx Lib "kernel32.dll" Alias _
"GetVersionExA" (lpVersionInformation As OSVERSIONINFO) As Long
Dim Ver As OSVERSIONINFO
Sub WindowsVersion()
Dim retVal As Long
Dim msg As String
Ver.dwOSVersionInfoSize = Len(Ver)
retVal = GetVersionEx(Ver)
If retVal = 0 Then
msg = "An error ocurred while trying to get version information"
MsgBox msg, vbOKOnly + vbExclamation, "Windows Version"
Else
msg = "Windows version number: " & Ver.dwMajorVersion & "." & Ver.dwMinorVersion
MsgBox msg, vbOKOnly + vbInformation, "Windows Version"
End If
End Sub
Sub WindowsVersion()
Const BatchCommand As String = "Ver >C:\winver.txt"
Dim FNum As Integer
Dim VersionStr As String
FNum = FreeFile
Open "C:\winver.bat" For Output As FNum
Print #FNum, BatchCommand
Close #FNum
Shell "C:\winver.bat", vbHide
FNum = FreeFile
Open "C:\winver.txt" For Input As FNum
Line Input #FNum, VersionStr 'Blank line
Line Input #FNum, VersionStr
Close #FNum
Kill "C:\winver.bat", "C:\winver.txt"
MsgBox VersionStr, vbOKOnly + vbInformation, "Windows Version"
End Sub
Open "C:\winver.txt" For Input As FNum