Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dectecting what OS Notes is working on

Status
Not open for further replies.

saecsens

Programmer
Aug 5, 2003
21
0
0
CA
Anyway to find out what is the OS of the Notes Client using LS or formulas ??? I'm in a hurry I need to found that asap


thanx alot

;)
 
'*** Does not cater for Win 2003 - Run in debug to detrmine the values to check for 2003 or later OS levels

Option Public
Option Declare
Option Compare Nocase

Private Type OS_VERSION_INFO_STRUCT
dwOSVersionInfoSize As Long
dwMajorVersion As Long
dwMinorVersion As Long
dwBuildNumber As Long
dwPlatformId As Long
szCSDVersion As String * 64 'Maintenance string for PSS usage is 128 but LMBCS is double byte
End Type

Declare Function GetVersionEx Lib "kernel32" Alias "GetVersionExA" _
( lpVersionInformation As OS_VERSION_INFO_STRUCT ) As Long

Function getWindowsVersion() As String

Dim session As NotesSession
Dim operatingSystem As String
Dim osVersionInfo As OS_VERSION_INFO_STRUCT

Set session = New NotesSession

If session.Platform <> &quot;Windows/32&quot; Then
operatingSystem = session.Platform
Else
osVersionInfo.dwOSVersionInfoSize = Len(osVersionInfo) '148
If GetVersionEx( osVersionInfo ) < 1 Then
operatingSystem = &quot;*OS Version Error*&quot;
Elseif osVersionInfo.dwPlatformId = 1 Then '95/98
If osVersionInfo.dwMinorVersion = 0 Then
operatingSystem = &quot;Windows 95&quot;
Elseif osVersionInfo.dwMinorVersion = 10 Then
operatingSystem = &quot;Windows 98&quot;
End If
Elseif osVersionInfo.dwPlatformId = 2 Then 'NT/2000/XP
If osVersionInfo.dwMajorVersion = 3 Then
operatingSystem = &quot;Windows NT 3.x&quot;
Elseif osVersionInfo.dwMajorVersion = 4 Then
operatingSystem = &quot;Windows NT 4.0&quot;
Elseif osVersionInfo.dwMajorVersion = 5 Then
If osVersionInfo.dwMinorVersion = 0 Then
operatingSystem = &quot;Windows 2000&quot;
Elseif osVersionInfo.dwMinorVersion = 1 Then
operatingSystem = &quot;Windows XP&quot;
End If
End If
End If
If operatingSystem = &quot;&quot; Then
operatingSystem = &quot;Windows&quot; _
& &quot; &quot; & Cstr(osVersionInfo.dwPlatformId) _
& &quot;.&quot; & Cstr(osVersionInfo.dwMajorVersion) _
& &quot;.&quot; & Cstr(osVersionInfo.dwMajorVersion)
End If
operatingSystem = operatingSystem & &quot; &quot; & osVersionInfo.szCSDVersion
End If

getWindowsVersion = operatingSystem

End Function

Find me @ onlinecorporatesoftware.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top