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 notes.net 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
 search=False

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

Sub main()
 path=""
 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)
fileline=source.readline
While Err.Number<>62
 If fileline<>oldkeyvalue Then
   dest.writeline(fileline)
  Else
   dest.writeline(newkeyvalue)
 End If		     Fileline=source.readline
Wend
End Sub

Main

Dig Deeper on Domino Resources - Part 6

SearchWindowsServer

Search400

  • Favorite iSeries cheat sheets

    Here you'll find a collection of valuable cheat sheets gathered from across the iSeries/Search400.com community. These cheat ...

  • HTML cheat sheet

    This is a really cool cheat sheet if you're looking to learn more about HTML. You'll find just about everything you every wanted ...

  • Carol Woodbury: Security

    Carol Woodbury

SearchDataCenter

SearchContentManagement

Close