Memoirs In Free Fall

October 13, 2005

Fighting Notes 6

Filed under: Uncategorized — Tags: — amit @ 3:03 am

So at work, our MUA/PIM/Groupware client is Lotus Notes R6, running against Domino servers. I recently gained a second email account on a new server, and spent much of today struggling with Notes trying to get it to work with both accounts. This is my story.

  • IT installed Notes without selecting the multi-user option, so Notes ended up with a Data directory under C:\Notes, where it was installed. There’s a Notes.ini in the installation directory. With this configuration, you cannot have two instances of Notes running at the same time.

    So I made another data directory and copied the templates over to this directory along with Notes.ini. I modified Notes.ini to reflect the new Notes ID and databases.

  • Speaking of my local NSFs, they were all encrypted using the old Notes ID. I had to replicate them into the new ID’s data directory sans encryption for the new ID to be able to open them. I fixed up the new ID’s Notes.ini to account for the new folders.
  • The standard deployment of Windows XP at my workplace disables Fast User Switching and the Welcome screen. I found a nifty tip to allow switching users anyway. It relies on uncrippling Terminal Services on Windows XP to some extent (which works beautifully, by the way).

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
    “AllowMultipleTSSessions”=“dword:00000001”

    The setting takes effect immediately, and I could immediately bring up Task Manager, hit the Users tab, select the current user and click Disconnect to be able to log in as another user for a new session leaving the current one running in the background.

  • I created a new account and started up Notes like this:

    C:\Notes\Notes.exe =C:\Notes\Data_newacct\newacct.id

    This caused Notes to start up with the new account settings, which meant using its copy of the local databases. I configured the default location to use the correct Domino server and mailstore database and to switch to the new ID (though that was probably unnecessary). I updated the Inbox bookmark too.

  • As a final touch, I changed the login shell for the new user to be Notes for minimal impact on memory.

    The way you do this is to change the registry key lookup order for the logon shell and then change the new user’s shell to Notes.

    By default, Windows will attempt to look in HKLM for the shell started by Winlogon at logon time:

    [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\IniFileMapping\system.ini\boot]
    “Shell”=“SYS:Microsoft\Windows NT\CurrentVersion\Winlogon”

    becomes

    [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\IniFileMapping\system.ini\boot]
    “Shell”=“USR:Microsoft\Windows NT\CurrentVersion\Winlogon”

    This setting takes effect immediately. The next thing to do is to log on as the target user (using “slow switching” as described above) and to set the shell to Notes:

    [HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Winlogon]
    “Shell”=“C:\Notes\Notes.exe =C:\Notes\Data_newacct\newacct.id”

    And sure enough, when I logged out and back in again as that user, only Notes came up. I could still use Ctrl-Shift-Esc to bring up Task Manager to switch users or log out.

So now I have two instances of Notes going for both user accounts, pretty smoothly. I’ve gotten used to using Task Manager to switch users, and I suspect there’s some entry point in user32.dll or similar that I can use with rundll32 to quickly “disconnect” the console “Terminal Services” session.

Unfortunately just segregating Notes along the lines of users via runas wasn’t sufficient; they had to be in different Terminal Services sessions. Works for me.

Blog at WordPress.com.