Misc. Resources

Specified Mini-Lesson

MIDAS#19 AutoCheck: Technique to verify LSX installation in database (Midas LSX)

This brief demo shows a new technique we have developed to improve the user experience for a customer downloading one of our sample databases. It can easily be copied for use in a customer database, or for use by another ISV who wants to verify an LSX or other software installation prior to use.
The first Midas LSX sample database to use the new code is the Export to CSV sample db, though all samples on the Midas LSX sample page will have this added soon. You may download the Export to CSV sample to try the code for yourself, but the event script is also included below. While it looks simple, it relies on a number of very specific interactions, so be careful when modifying it.
Sub Postopen(Source As NotesUIDatabase)
Const VersionNeeded = "5.1"
Dim ws As New NotesUIWorkspace
Dim s As New NotesSession
On Error GoTo CatchError
Call s.SetEnvironmentVar("MidasLSX_VersionNum", "", False)
Print "Check to see if Midas LSX is installed with V"+VersionNeeded+" or higher"
Execute |Uselsx "*lsxrtc"
Dim gSession As New GeniiSession
Dim sess As New NotesSession
Call sess.SetEnvironmentVar("MidasLSX_VersionNum", CStr(gSession.Version), False)|
If s.getenvironmentstring("MidasLSX_VersionNum", False) < VersionNeeded Then
MessageBox "A newer version of the Midas LSX is needed. To update your installation, click 'OK' and follow the instructions"
Call ws.OpenPage("MidasLSXInstallation")
Print "Verified that Midas LSX V"+s.getenvironmentstring("MidasLSX_VersionNum", False)+" is installed"
End If
Exit Sub
MessageBox "The Midas LSX must be installed in order to use this database. Click 'OK' and follow the instructions to install."
Call ws.OpenPage("MidasLSXInstallation")
Exit Sub
End Sub

Copyright © 2014 Genii Software Ltd. All Rights Reserved.