About Duffbert...

Duffbert's Random Musings is a blog where I talk about whatever happens to be running through my head at any given moment... I'm Thomas Duff, and you can find out more about me here...

Email Me!

Search This Site!

Custom Search

I'm published!

Co-author of the book IBM Lotus Sametime 8 Essentials: A User's Guide
SametimeBookCoverImage.jpg

Purchase on Amazon

Co-author of the book IBM Sametime 8.5.2 Administration Guide
SametimeAdminBookCoverImage.jpg

Purchase on Amazon

MiscLinks

Visitor Count...



View My Stats

« What Is the LastHistoryPruneTime Notes.ini Entry for? | Main| Blog hit counter milestone... »

How to Determine the Installed Client Type Programmatically

Category Software Development

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

Post A Comment

:-D:-o:-p:-x:-(:-):-\:angry::cool::cry::emb::grin::huh::laugh::lips::rolleyes:;-)

Want to support this blog or just say thanks?

When you shop Amazon, start your shopping experience here.

When you do that, all your purchases during that session earn me an affiliate commission via the Amazon Affiliate program. You don't have to buy the book I linked you to (although I wouldn't complain!). Simply use that as your starting point.

Thanks!

Thomas "Duffbert" Duff

Ads of Relevance...