« Cingular Seminar on Blackberry Integration with Domino | Main| If Palm Is Going Windows, So Is My Next PDA »

Secrets of the Administration Guild #8: Pushing Notes.ini Settings To The Client

Category Administration

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).


desktopone.JPG 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

Gravatar Image8 - Hi, this code has proved to be very useful in my Notes environment. I am now able to set all kinds of useful notes.ini and location document parameters that have been frustrating our users for a long time.

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... Emoticon

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

Gravatar Image7 - Are there variables that can be used in the notes.ini values to represent the user?

IE:
cache=C:\windows\temp\%user%.dsk

where %user% would expand to Patrick Picard or the shortname ...?

Gravatar Image6 - Ari, let's take this off line. I'm not really sure by what you mean for the location documents pointing to the home servers.

Gravatar Image5 - We currently have location documents which point to our UAT and Development environment. Ever since I have added the Policy Settings all location documents are being modified to the users home mail server. is there a way to prevent this from happening.
Thanks

Gravatar Image4 - Ted: It would be nice to be able to automate the client-replication settings. Trouble is, unlike servers, clients have locations and they switch between them. So, it's actually a bigger challenge than first appears. I feel your pain, though.

Jack

Gravatar Image3 - No kidding, I can't figure out why we can't set scheduled replication for clients. It's nice to be able to set the mobile directory for them, but then when it doesn't replicate, they can't use type-ahead and the helpdesk gets a call.

They do so well, and then trip over something like this!

Gravatar Image2 - Well, glad you like it--the advantage of the toolbar is that it's portable between Domino Directories. If work with multiple directories (or work as a consultant) it's an easier tool.

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

Gravatar Image1 - Great idea!! I've been playing around with this for the last couple of weeks and in my case ended up hacking the subform to add the UI for the one change I wanted, but this makes it very nice to work with future additions. Thanks for posting the code!

Post A Comment

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