The following is how I've got Notes in USB working for 9.0.1.
Hope it's helpful to some.
Configuring Notes on USB v9.0.1 (NOMAD’ish’) – Version 1.3.x
Problem:
NOMAD doesn’t run with the Notes 9.x code base.
9.0.1 at least lets you install now, even when there is another instance of Notes on the PC.
When attempting to run, system generate errors that it cannot find files/locations.
Solution:
NOMAD is supposed to changes the systems file references to the current USB drive letter every time the drive is connected. This is normally handled by the NOMAD.exe / nomad.msi programs.
At the very heart of the requirement for Notes on USB, the main file that needs to be updated is notes.ini, specifically variables such as Directory and KeyFileName so it knows where to look for files/user.id etc.
An alternate method of determining the current drive letter and updating the required files is required. I decided to do this via a cmd/batch file, in conjunction with a third part utility which does character substitution in text files (‘fart.exe’)
Requirements:
USB Drive (Min 4 or 8GB) as Fast a possible. Make note of the Drive letter Assigned to the Drive
Notes 9.0.1 Standard Client Install Files, User.id for the client/user (either physically or in id vault)
Connection capable of reaching Domino server
FART.exe Utility (Find And Retrieve Text) available from http://fart-it.sourceforge.net/
NotesOnUSB9x.cmd file
Preparation:
· Extract the Notes Standard Client install files to a folder (eg: C:\InstallFiles\Notes)
· Run the ‘nomad’ installation from the Extracted installation files.:
C:\InstallFiles\Notes\Setup /a /v"NOMAD=1 TARGETDIR=U:\ /qb+"
Where U:\ is the driver letter assigned to the USB drive:
This will install the program to U:\Program Files\IBM\Notes\
· Once the install has completed MOVE the ‘IBM\*’ folder(and all it’s sub folders) to the root of the USB Drive ie: The Program files will now be located in U:\IBM\Notes\*
There should be nothing left in U:\Program Files\ , however DO NOT DELETE THE FOLDER
This move is done to make it easier on the scripts so they don’t have to worry about spaces in file paths.
· NOTE: If you chose to set the Program folder to something other than \IBM\Notes and the Data folder to \IBM\Notes\Data, then you need to make the appropriate adjustment at the top of the NotesOnUSB9x.cmd file
:: SET BASE PATHS
set _nouBasePROG=IBM\Notes\
set _nouBaseDATA=IBM\Notes\Data\
set _nouFARTPath=fart.exe
· The ‘FART’ utility is assumed to be saved in the root of the USB drive. If you put elsewhere, you need to change the _nouFARTPath.
· The NotesOnUSB9x.cmd file is saved to the root of the USB drive eg: U:\NotesOnUSB9x.cmd
Setting Up/Running the Client:
· Run the U:\NotesOnUSB9x.cmd
The routine will:
Work out the USB Drive letter.
Calculate what the Notes Program and Data folders should be
Check that the Notes Folder have been moved to where it expects.
Check that the fart.exe file is where it expects.
If any of the folder or file check fail, the routine will stop with and error.
Once the initial checks are done:
The ‘old’ drive letter is calculated from the notes.ini
The notes.ini “Directory=” is changed to match the new settings.
Any notes.ini variables using the ‘old’ drive letter are updated to the new settings.
The routine will then launch ‘nlnotes.exe’
If notes have not yet been configured, then the setup wizard will start.
Complete the wizard as you would for a regular Standard Client with online/offline options.
Once the “Notes Setup is Complete” then configure locations/connection etc as required.
If Notes has already been configured, then the client will start up as ‘normal’
Running the Client on any Windows PC
As long as you have permission to run cmd files that call exe’s locked down. You can run the NotesOnUSB9x.cmd as a standard user. I’ve tested from XP through to Windows 8.1pro 64bit.
It is best run manually – auto running it gets a little confused on some systems and I haven’t figured out why yet. The ‘command windows’ does hang around while Notes is running. It will close on Notes closes.
As long as your USB device gets a driver letter, the batch file and the ‘fart’ utility take care of all the drive letter changing that the nomad.exe does without all the extra installs of nomad monitors or registry mucking around.
The ‘magic’ is done by ignoring everything to do with nomad once the files are on the USB drive.
The cmd file does not call autorun, or any .msi. Instead it runs ‘nlnotes.exe’, the little secret admins have had in their toolkit for at least as long as I’ve been using notes (I go back to v4x)
BTW if anyone knows how to do character substitution in a text file through a batch file without a 3rd party utility, I’d be overjoyed to hear about it. It would be great to be able to do this in one batch/script.
I suspect you could probably do it all in a vb, or wsh script but wanted to avoid them as many organisations won’t allow regular users to run them which is why I stuck to the cmd batch.
Below is the NoteOnUSB9x.cmd script. It is absolutely ‘bare bones’. You could add some checking to make sure the notes files/fart.exe are where they are expected etc. Perhaps make it prettier to the end user; but it works, and is fast.
The NoteOnUSB9x.cmd script
@ECHO OFF
:: ******************************************************************************
:: *** NotesOnUDB9x.cmd - IBM Standard Notes Client Version 9.x USB Device ***
:: *** ***
:: *** Written 26 January 2014 John W Humphreys ***
:: *** ***
:: *** ***
:: ******************************************************************************
SET _nouVer=1.3.1258B
SET _nouClient=9.0.1
TITLE Notes Standard Client on USB for Notes %_nouClient% - Version %_nouVer%
:: SET BASE PATHS
set _nouBasePROG=IBM\Notes\
set _nouBaseDATA=IBM\Notes\Data\
set _nouFARTPath=fart.exe
:: GET USB
for /f "delims=\" %%d in ('cd') do set _nouCurDRV=%%d
:: SET NOTES PATHS
set _nouCurUSB=%_nouCurDRV%\
set _nouCurPROG=%_nouCurDRV%\%_nouBasePROG%
set _nouCurDATA=%_nouCurDRV%\%_nouBaseDATA%
:: Add USB dll Folders to PATH
SET PATH=%PATH%;%_nouCurPROG%;%_nouCurDRV%\Win\System;%_nouCurDRV\Windows;%_nouCurDRV%\System32;%_nouCurDRV%\Windows\System32;%_nouCurDRV%\Windows\winsxs
:: REBUILD autorun.inf
ECHO [Autorun] >> %_nouCurUSB%autoinf.new
ECHO open=NotesOnUSB9x.cmd >> %_nouCurUSB%autoinf.new
ECHO icon=\%_nouBasePROG%notes.exe,0 >> %_nouCurUSB%autoinf.new
DEL %_nouCurUSB%autorun.inf /f /q
REN %_nouCurUSB%autoinf.new autorun.inf
:: REBUILD autorun.ini
ECHO [Autorun] >> %_nouCurUSB%autorun.new
ECHO MSI_LOCATION=%_nouCurDRV%\IBM Notes 9.0.1.msi >> %_nouCurUSB%autorun.new
ECHO MSI_COMMANDLINE=/qb PROGDIR="%_nouCurPROG%" DATADIR="%_nouCurDATA%" NOMADDIR="%_nouCurUSB%" >> %_nouCurUSB%autorun.new
ECHO AUTOLAUNCH_NOTES=Yes >> %_nouCurUSB%autorun.new
ECHO AUTORUN_MODE=Yes >> %_nouCurUSB%autorun.new
DEL %_nouCurUSB%autorun.ini /f /q
REN %_nouCurUSB%autorun.new autorun.ini
:: Copy autorun.ini file to PROG directory - For some reason the system needs to find it.
CD %_nouCurPROG%
xcopy %_nouCurUSB%*.ini %_nouCurPROG%*.* /R /Y
:: Updating notes.ini variables with current USB Drive letter and Data Directory
:: Using 'fart.exe' (http://fart-it.sourceforge.net/) for the driver letter substitution.
:: Get the 'Directory' Value from the current notes.ini
FOR /F "tokens=1,2 delims==" %%a IN (notes.ini) DO (IF /I "%%a" EQU "Directory" Set _nouOldINIdir=%%b)
:: Get the 'old' Drive letter from the Directory Value
FOR /F "tokens=1,2 delims=:" %%a IN ("%_nouOldINIdir%") do (set _nouOldUSB=%%a:\)
:: Replace the 'Directory=x:\Program Files\IBM\Notes' to the set standard (First Run)
%_nouCurUSB%%_nouFARTPath% -i notes.ini "Directory=%_nouOldUSB%Program Files\IBM\Notes\Data" Directory=%_nouCurDATA%
:: Updating all notes.ini drive references from old drive to new one.
%_nouCurUSB%%_nouFARTPath% -i notes.ini %_nouOldUSB% %_nouCurUSB%
:: Start Notes Client ('nlnotes') instead of notes or nomad
CD %_nouCurUSB%
%_nouCurPROG%nlnotes.exe
::ALLDONE
EXIT