I want a means to determine whether the perating system is Vista or not, upon
startup of an application. It does not need to check for all possible
permutations of Windows operating systems - just Vista or not.
The problem, however, with using the typical GetVersionEx API is
compatibility mode - which I have never gotten to work for any application,
but I digress.... The OS checker function has to be reliable.
Some possible approaches ?
> registry values at HKLM\Software\Microsoft\Windows NT\CurrentVersion
> check for existence of a Vista-only system file in WINDOWS\SYSTEM32
> check the version of Notepad.exe
> check the version of the VBA reference
Since I have no clue how to check any of these, what do you make of the
problem ?
Thank you.
BrerGoose
Douglas J. Steele - 08 Oct 2007 13:20 GMT
Take a look at http://www.mvps.org/access/api/api0055.htm at "The Access
Web"
You'll need to add:
If .dwPlatformId = VER_PLATFORM_WIN32_NT And _
.dwMajorVersion = 6 And _
.dwMinorVersion = 0 Then
strOut = "Windows Vista (Version " & _
.dwMajorVersion & "." & .dwMinorVersion & _
") Build " & .dwBuildNumber
If (Len(.szCSDVersion)) Then
strOut = strOut & " (" & _
fTrimNull(.szCSDVersion) & ")"
End If
End If

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
>I want a means to determine whether the perating system is Vista or not,
>upon
[quoted text clipped - 17 lines]
> Thank you.
> BrerGoose
BrerGoose - 08 Oct 2007 15:13 GMT
As previously mentioned, the GetVersionEx API is unreliable due to
compatibility mode. Need a means that does not involve GetVersionEx, since
that returns the fake operating system data.
Thank you.
BrerGoose
Douglas J. Steele - 08 Oct 2007 15:31 GMT
I've not heard of problems with that code. Perhaps you can give more details
about the error you've encountered.

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
> As previously mentioned, the GetVersionEx API is unreliable due to
> compatibility mode. Need a means that does not involve GetVersionEx,
[quoted text clipped - 3 lines]
> Thank you.
> BrerGoose
BrerGoose - 08 Oct 2007 18:16 GMT
Go to any search engine and enter: GetVersionEx Compatibility
You will find various threads of discussion about how compatibility mode
returns the wrong operating system value.
Thank you.
BrerGoose
Alex Dybenko - 09 Oct 2007 15:29 GMT
Hi,
I read somewhere that MS recommends to check for specific feature then to
check windows version, perhaps this can be a solution for you?

Signature
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com
> Go to any search engine and enter: GetVersionEx Compatibility
>
[quoted text clipped - 3 lines]
> Thank you.
> BrerGoose