Manage Learn to apply best practices and optimize your operations.

Setting ECL at user login

Every Time user login to the network and after open Lotus Notes trasparently refresh the local ECL.

To reset the user workstation ECL with the Administration ECL the forum suggests to use the @RefreshECL formula or the Session.SetEnvironmentVar("ECLSetup","1",True) method from LotusScript. Both Methods are for use with a button in a E-Mail Message.

Unfortunately they require a restart of Lotus Notes to take effect (at restart Lotus Notes read the notes.ini settings!)

I have written this script in vbscript:it execute with Login Script (Novell or Windows), search in the folder of drive c: for notes.ini, copy this file to notes.old for backup and create new copy of notes.ini with ECLSetup variables set to 1.

Every Time user login to the network and after open Lotus Notes trasparently refresh the local ECL.

Const inifile="notes.ini"
Const bckfile="notes.old"
Const root="c:"
Const oldkeyvalue="ECLSetup=3"
Const newkeyvalue="ECLSetup=1"
Dim fso 'as filesystem object
Dim path 'as string

Function search(dirbase,fname)
 Dim fold 'as folder object
 Dim subf 'as folder collection object
 Dim sinf 'as folder object

 Set fold=fso.getfolder(dirbase)
 Set subf=fold.subfolders

 For Each sinf In subf
  path=dirbase & & ""
  If fso.fileexists(path & fname) Then
  End If
End Function

Sub main()
 Set fso=CreateObject("Scripting.FileSystemObject")
 If Not search (root,inifile) Then  MsgBox "Unable to find file " & inifile 
End Sub

Sub modify ()
 On Error Resume Next
 Dim source 'as textfile
 Dim dest 'as textfile
 Dim fileline 'as string

 fso.CopyFile path & inifile,path &  bckfile,True
Set source=fso.opentextfile (path & bckfile,1)
Set dest=fso.CreateTextFile(path & inifile, True)
While Err.Number<>62
 If fileline<>oldkeyvalue Then
 End If		     Fileline=source.readline
End Sub


Dig Deeper on Domino Resources - Part 6



  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...