For a small project which requires a custom made DLL for a Lotus Notes database, I have to deploy this custom DLL to the user’s workstations in order for the application to work. I’ve decided to attempt doing it from within the Lotus Notes Database Script, in the PostOpen event. This event is trigerred when the database is opened.
Sub Postopen(Source As Notesuidatabase) Call ExtractDLL("mycustom.dll") End Sub
The database itself contains a hidden view
(dll) keyed on dllname in it.
The forms have a rich text field on them (dllbody) into which a DLL is
attached. What the sub
ExtractDLL now does is to first check if the DLL
exists on the user’s workstation, and if it doesn’t, it searches for the first
document in the view that matches the name of the file to extract, retrieves
the attachment and dumps it into the Lotus program directory.
ExtractDLL utilizes Rocky Oliver’s getNotesProgramDirectory() function to determine the directory in which Lotus Notes is installed. That is the directory into which the DLLs are dropped. If you have to deploy more than one DLL, just set up the documents which their attachments accordingly and invoke several calls to ExtractDLL, specifying the name of each DLL in turn. Unfortunately, this is not “real” software deployment, as it doesn’t cater for updated file versions, but it has helped me in this pinch.