Retrieve and Update NOTES.INI Environment Values

The NOTES.INI file contains global environment settings used to manage the Lotus Notes client and associated databases.

How It Works

Using the GetEnvironmentString and SetEnvironmentString methods, you can obtain and set values stored in the NOTES.INI file. Both methods are associated with the NotesSession class. Retrieved values can be assigned, modified, and updated in the file. New environment names and values can also be created and appended to this file. You may want to do this to track a value that is specific to a particular database.


The following example illustrates both the Get and Set methods. To manage values in NOTES.INI, first determine the variable name that you want to retrieve, modify, or insert into the file. The NOTES.INI file is typically stored in the /Notes directory. Next, adjust the following code to reference the variable name and insert the code into an action button (or other LotusScript event). You will need to update the variable name and uncomment the associated statements to try the Set method. You will also need to make a backup of the file prior to implementing code that updates this file.

Sub Click(Source As Button)

 Dim s As New NotesSession
 Dim theValue As String

 ' Get an environment value
 Set s = New NotesSession
 theValue = s.GetEnvironmentString("TimeZone", True)
 Msgbox "The current time zone value is: " & theValue

 ' Set an environment value
 ' theValue = "VALUE"
 ' Call s.SetEnvironmentVar("FIELD", theValue, True)

End Sub

An Introduction to the Lotus Domino Tool Suite

Getting Started with Designer

Navigating the Domino Designer Workspace

Domino Design Elements

An Introduction to Formula Language

An Introduction to LotusScript

Fundamentals of a Notes Application

Calendar Applications

Collaborative Applications

Reference Library Applications

Workflow Applications

Web Applications

Design Enhancements Using LotusScript

Design Enhancements Using Formula Language

View Enhancements

Sample Agents

Miscellaneous Enhancements and Tips for Domino Databases

Data Management


Application Deployment and Maintenance


Appendix A. Online Project Files and Sample Applications

Appendix B. IBM® Lotus® Notes® and Domino®Whats Next?

Lotus Notes Developer's Toolbox(c) Tips for Rapid and Successful Deployment
Lotus Notes Developers Toolbox: Tips for Rapid and Successful Deployment
ISBN: 0132214482
EAN: 2147483647
Year: N/A
Pages: 293
Authors: Mark Elliott © 2008-2020.
If you may any questions please contact us: