I can't help with the script (read: I'm too lazy) but I manually pull this trick myself quite a bit. Here's how I'd go about it:
- you need two data directories. This is because once the first instance has hit your names.nsf, bookmarks.nsf etc ... they'll be locked and the second instance won't be able to access them (Sometimes I put common dbs into their own separate directories and dirlink them into the data directory)
- copy your notes.ini (call it something easily associated with your second instance's purpose) and edit the line `Directory=` to point to your second data directory.
- find your notes icon (I'm presuming Windows here) and edit the shortcut to point to nlnotes.exe rather than notes.exe.
- add the command-line option `=<path_to_your_main_ini_file>` to your icon shortcut (more details [here][1])
- copy your shortcut and edit the command-line option to read `=<path_to_your_second_ini_file>`
- launch both instances and verify they behave themselves. At the very least you'll want to create different location documents with the respective mail servers defined and defaulting to the respective ids.
Note the link above has some tips about adding specific command options to auto-open various databases.
With respect to the script, you may not actually need it once you've done the above but if you feel you do then issuing the command lines from the two shortcuts should be sufficient (I think).
Some Caveats
- I've only ever done this with the basic (non-eclipse) Notes UI. Don't hold your breath if you want two instances of the Eclipse UI
- If you copy your data directory then the databases in that directory are replicas of the databases in the original. Not a problem if you're using different ids and not roaming. Otherwise tread carefully or you may find funny things like changes to one names.nsf cropping up in the other etc (bearing in mind the two clients won't directly replicate with each other but could both be replicating with a server).
I think that about covers it. Pop a comment under this post if you need anything clarified.
EDIT
grrr, the link didn't want to work. Here it is.