Secrets of the Administration Guild #8: Pushing Notes.ini Settings To The Client
I think this is a great tip—it just takes a little work to make it shine. The idea is to leverage Desktop Policy/Setting documents to push any (a) client notes.ini settings or (b) location document configuration, down to the workstations. Suppose the latest release of Notes has a new notes.ini entry that you'd like to add to every single desktop in your enterprise. Finally, it's possible to have that kind of control over the Notes client. I've made it easy for you (as simple as I can make it).
ND6
and V7 both support this dynamic
push to the desktop of client configuration settings.
All that's required is for a field to be created in the Desktop
Setting document that begins with either “$Pref” or
“LocAll.” “$Pref” is for notes.ini values,
and “LocAll” is to add or update location document
settings. It's all very useful, except for two details: (1)
administrators hate modifying their Domino Directory with custom code
and (2) IBM Lotus has not provided any sort of a UI to enter these
settings.
Here's my solution . . .
In order to meet the criteria I listed above, no changes can be made to the Domino Directory and some sort of an user interface is required. I'd love to be able to create a handsome interface, but I have only two options: create a stand-alone application form which to launch a sophisticate UI to interface with the Domino Directory or use a custom toolbar icon. I do like the first option, but I'm going to choose the second, as it is the simplest, and probably an easier sell to the administrator (afterall, it goes into their own toolbar, and is not readily available to anyone else).
So, all you need to do is add the code below into a custom toolbar icon. Now you can (a) view all the notes.ini and location document settings that are included in a desktop setting; (b) delete any settings; and (c) add new entries or change existing ones.
REM {Copyrighted (C) 2005 by Jack Dausman http://LeadershipByNumbers.com -- you may copy and distribute this freely, but credit the source}; REM {I tried to make this code as readable as possible}; REM {Notes is good for identification, and I like to put the name of the user into any alerts}; v_name := @UpperCase(@Left(@Name([CN];@UserName);" ")); REM {Check to see if the right document has been selected, if not then generate an explanation}; @If(form="PolicyDesktop";"";@Return(@Prompt([Ok];"ALERT";v_name +", YOU DID NOT SELECT A DESKTOP POLICY DOCUMENT" + @Char(13) + "This script allows you to change your users' notes.ini" + @Char(13) + "settings and Location Document preferences" + @Char(13) + @Char(13) + "For more information:" + @Char(13) +"http://www.leadershipbynumbers.com"))); REM {Get all the fields in the document, then loop through them and pulling out the ones we need with their content}; v_docitems:= @Trim(@Transform(@DocFields;"var"; @If(@Begins(var;"$Pref":"LocAll");var +": "+ @Text(@GetField(var));""))); REM {Provide the choices for user prompt. If you change these, then you'll need to change the contingent @If statement conditions}; v_choices := "View Existing Notes.Ini and Location Document Settings": "Add or Change A Notes.Ini Settings and Location Document": "Delete A Notes.Ini Settings and Location Document"; REM {Prompt for a choice}; v_setting:=@Prompt([OkCancelList]; v_name + ": SELECT A DESKTOP SETTING"; "Please select your note.ini or location document change";v_choices[1] ; v_choices); REM {Delete field}; @If(v_setting="Delete A Notes.Ini Settings and Location Document"; @Return(@SetField(@Left(@Prompt([OkCancelList];v_name + ", CAUTION THIS WILL DELETE A SETTING !";"PICK AN INI OR LOCATION SETTINGS TO DELETE";v_docitems[1];v_docitems);":");@DeleteField));""); REM {If all we need is to see the list, here it is}; @If(v_setting="View Existing Notes.Ini and Location Document Settings"; @Return(@Prompt([OkCancelList];"ALL INI AND LOCATION SETTINGS";"A COMPLETE LISTING OF ALL INI AND LOCATION SETTINGS";v_docitems[1];v_docitems)) ;""); REM {Wouldn't it be nice to add some real explanations ? Unfortunately, the @prompt doesn't give a lot of text length with which to work. Notice that if the if statement doesn't catch the condition, it exits out of the code with an @Return. And if the user selects "cancel" it will exit out, as well, no -1 is returned}; @If(v_setting="Add or Change A Notes.Ini Settings and Location Document"; v_inisetting:=@Prompt([OkCancelEditCombo];"PROMPT 1 OF 2: SELECT OR ADD AN INI AND LOCATION SETTINGS"; "- To modify an existing value, simply select it without making any " + @Char(13)+ " changes to it or its value." + @Char(13)+ "- To add a new value you must enter in the correct format." +@Char(13) + " New client notes.ini setting are prefaced by " +"\"$Pref\" and" +@Char(13) + " location settings by \"LocAll\"" ;v_docitems[1];v_docitems) ;@Return("")); REM {Double check that the prefix is correct}; @If(@Begins(v_inisetting;"$Pref":"LocAll");""; @Return(@Prompt([ok];v_name +{: ALERT};{THIS FORMAT DOES NOT HAVE A CORRECT PREFIX} +@Char(13)+ {IT MUST START WITH EITHER "$Pref" or "LocALL"} +@Char(13) + @Char(13) + {TRY AGAIN}))); rem {get setting name}; v_settingname:= @If(@Left(v_inisetting;":")="";v_inisetting;@Left(v_inisetting;":")); rem {get new value, showing the old value if there was one}; v_value:=(@Prompt([okcanceledit];{PROMPT 2 OF 2: } +v_name +{, NOW ENTER THE VALUE FOR YOUR SETTING};{Value for } + v_settingname;@Right(v_inisetting;" "))); rem {set setting value and it's all done}; @SetField(v_settingname;v_value);
- 


Comments
For example: Lots of our users had some, or most ports enabled in their clients, when they should only have TCPIP running. any other ports can seriously affect performance:
Pushing out "ports=tcpip", and "DisabledPorts=LAN0,COM1,COM3,COM2,COM4,COM5" has worked like a charm to fix this.
However...
How can I push out a setting of "No Value"?
For example, many of our users have passthru servers incorrectly set in their location documents. Is it possible to remove any value set in the "DefaultPassthruServer" field using this code? At present, I think I can only set "Something" rather than "Nothing".
Thanks for the code, Jack.
SB
Posted by Stephen Bailey At 05:45:54 PM On 07/21/2008 | - Website - |
IE:
cache=C:\windows\temp\%user%.dsk
where %user% would expand to Patrick Picard or the shortname ...?
Posted by Patrick Picard At 02:33:58 AM On 03/28/2008 | - Website - |
Posted by Jack Dausman At 06:31:14 AM On 05/08/2007 | - Website - |
Thanks
Posted by Ari Perdis At 09:52:20 AM On 05/06/2007 | - Website - |
Jack
Posted by Jack Dausman At 10:24:11 AM On 10/26/2005 | - Website - |
They do so well, and then trip over something like this!
Posted by Ted At 07:24:14 AM On 10/25/2005 | - Website - |
What I can't figure out, is why it is still "undocumented" in V7? Why no interface? Even something like the primitive (V3) notes.ini UI in the configuration document would be useful. Maybe it's a little too powerful for casual administrators?
Jack
Posted by Jack Dausman At 06:01:19 AM On 10/22/2005 | - Website - |
Posted by Ted At 05:40:43 AM On 10/22/2005 | - Website - |