In a .NET 2.0 C# application I use the following code to detect the operating system platform:
string os_platform = System.Environment.OSVersion.Platform.ToS
Enjoy ;-)
Function Is64Bit() As Boolean Return My.Computer.FileSystem.SpecialDirectories.ProgramFiles.Contains("Program Files (x86)") End Function