Recently I worked on a project that required to detect if a 32-bit operating system were running or not. Initially I thought it would be necessary to read from the Windows Registry but it turned out to much easier then that.
The following snipped code requires VS 2010 and that we use .NET Framework 4.0.
Private Sub btnCheck_Click(sender As System.Object, e As System.EventArgs) _ Handles btnCheck.Click '.NET Framework 4.0 and VS 2010 makes it easy. If Environment.Is64BitOperatingSystem Then 'code goes here... Else 'code goes here... End If End Sub
That wasn’t hard at all
Kind regards,
Dennis