How are you guys identifying Windows 7 OS

That seems like how I'd go about getting the OS version, but if you're specifically trying to get to the Program Files path, there's Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86) with .NET 4.

source: http://stackoverflow.com/questions/194157/c-sharp-how-to-get-program-files-x86-on-vista-x64

--- In vantage@yahoogroups.com, "dgodfrey_amc" <dgodfrey_amc@...> wrote:
>
> We are moving some users over to Windows 7 as well as the company to Epicor 9 and I need to Identify the OS. This is what I came up with. I just wanted to compare it to the group and see if there is a better way to identify Windows 7.
>
> Private Function GetProgramFilesDirectory() AS String
> Dim sResults AS String = String.Empty
> Dim osInfo As OperatingSystem
> osInfo = Environment.OSVersion
> Dim verInfo As Version
> verInfo = osInfo.Version
>
> IF(verInfo.Major >= 6 AND verInfo.Minor >= 1) Then 'Windows 7 Identifier
> sResults = "C:\Program Files (x86)"
> Else
> sResults = "C:\Program Files"
> End If
>
> return sResults
> End Function
>
We are moving some users over to Windows 7 as well as the company to Epicor 9 and I need to Identify the OS. This is what I came up with. I just wanted to compare it to the group and see if there is a better way to identify Windows 7.

Private Function GetProgramFilesDirectory() AS String
Dim sResults AS String = String.Empty
Dim osInfo As OperatingSystem
osInfo = Environment.OSVersion
Dim verInfo As Version
verInfo = osInfo.Version

IF(verInfo.Major >= 6 AND verInfo.Minor >= 1) Then 'Windows 7 Identifier
sResults = "C:\Program Files (x86)"
Else
sResults = "C:\Program Files"
End If

return sResults
End Function