I made a small project which is a part of a bigger one, this project is a form of one button with two textboxes.

This code works when user clicks on the button:

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        If System.Environment.Is64BitOperatingSystem = True Then
            TextBox1.Text = "64-bit Operating System"
            TextBox1.Text = "32-bit Operating System"

        End If

        If System.Environment.Is64BitProcess = True Then
            TextBox2.Text = "64-bit processor"
            TextBox2.Text = "32-bit processor"
        End If
    End Sub
With that code I wanted to tell the user (or the bigger project) what operating system and type of processor he has on his PC?

I tried the program on many devices and was fine until one day it showed me a x64 Operating System on a 32-bit Processor, and I know it's impossible.

So I knew that there is a problem with determining the right Processor.

I need to correct this code to determine and tell the exact OS and Processor type.

Thank you