Need function to determine if OS is Vista

B

Bob Valentine

Group:

I need an function to determine if Vista is the operating system. The code
that I have found on some of the Access sites haven't yet been updated to
determine the Vista oprerating system. They will determine operating systems
from XP and prior, but return a null string if the operating system is
Vista. I realize that I can assume that if the function returns a null
string, then it must be Vista, but I'd like to have a function that will
detect Vista.

Does anyone know of a function that will determine if the operating system
is Vista?

Thanks,
BobV
 
D

Douglas J. Steele

Add the following to http://www.mvps.org/access/api/api0055.htm at "The
Access Web"

If .dwPlatformId = VER_PLATFORM_WIN32_NT And _
.dwMajorVersion = 6 Then
strOut = "Windows Vista (Version " & _
.dwMajorVersion & "." & .dwMinorVersion & _
") Build " & .dwBuildNumber
If (Len(.szCSDVersion)) Then
strOut = strOut & " (" & _
fTrimNull(.szCSDVersion) & ")"
End If
End If
 
B

Bob Valentine

Thanks Doug,

This is just what I am looking for. I wonder if it be possible to also
determine which version of Vista is being used (Vista Home Basic, Vista Home
Premium, Etc.)?

Thanks so much,
BobV
 
D

Douglas J. Steele

Afraid I haven't seen code to show that (just as I haven't seen code to
distinguish between XP Home and XP Pro).
 
B

Bob Valentine

Thanks for everything Doug. Actually, all I need to know is whether the OS
is Vista, XP, prior version of the OS. It doesn't really matter whether it
is Vista Home Premium, or whatever. I just thought it would be nice to know.

BobV
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top