How to Determine the Installed Client Type Programmatically
One more potentially useful little script... From the KnowledgeBase...
How to Determine the Installed Client Type Programmatically
Document Number:
1094622
Problem
Using LotusScript, how can you determine
the type of install a user has performed (for example, Notes Client or
Designer)?
Content
There are several programming methods to
collect this information. One method is illustrated below.
1. Create
a database that contains at least two fields, one for the user's name and
one for the user's installation type. (In the sample script below,
the fields are called UserName and LicenseType, in a form called Main.)
2. Create
a script that runs when the user performs a particular action, such as
opening the mail file. Place the script in the PostOpen Event of
the Database Scripts.
3. The
NOTES.INI in R5 has a new entry that indicates the Installation Type. For
example:
InstallType= #*
*0 = Designer License
1 = Administration License
2 = Both Designer and Administration
License
3 = Domino Mail Server
4 = Partitioned Servers
5 = Domino Server
6 = Notes Client
4. With
this NOTES.INI entry in place, the following script can be used. (Note
that this script is provided as an example and can be enhanced further
to met your needs.)
Dim
Session As New NotesSession
Dim
DoneCheck As String
Dim
TargetDB As NotesDatabase
Dim
doc As NotesDocument
' Make
sure the sever is specified in the following line.
Set
TargetDB = Session.GetDatabase("","license.nsf")
If
Session.GetEnvironmentString("DoneCheck") = "Yes" Then
Exit Sub
Else
Set doc = TargetDb.CreateDocument
doc.form = "Main"
doc.username = Session.CommonUserName
doc.LicenseType = Session.GetEnvironmentString("InstallType",
True)
Call Session.SetEnvironmentvar("DoneCheck","Yes")
Call doc.Save(True,True)
End
If


