The Future Is Now – Launching OpenInsight Applications

SRPLauncherOur new blog article has a two-fold purpose. First, we want to review a few of the new command line switches that will be introduced with OpenInsight 10. Second, we are pleased to announce a minor enhancement to our SRP Application Launcher tool, which nicely complements our first purpose!

 

Command line switches are a common feature of OpenInsight. Probably every shortcut to a production OpenInsight application uses one or more of the following switches: /AP, /UN, /PW, and /DV. Without these switches it would be hard to create an application shortcut that is unique to the end user’s system. Revelation saw fit to take this further by adding even more switches that customize the way OpenInsight applications are launched.

The SRP Application Launcher was designed to provide launch features absent in older versions of OpenInsight. However, we need to mention that the SRP Application Launcher will be just as useful to OpenInsight 10. While the SRP Application Launcher does provide features that older versions of OpenInsight are lacking, its primary purpose is to allow developers a way to create custom configurations for launching applications without having to expose the full command line to prying eyes. One of our chief complaints about OpenInsight has been the lack of creating a compiled executable (i.e., MyApp.exe). Consequently, every OpenInsight application points to the same file: OINSIGHT.exe. This makes it easy for the curious to experiment with launching OpenInsight with different switches, or no switches, which eventually leads to the Open Application and Run Application menu:

 OpenApplication

 

OpenInsight 10 will be able to obscure most of the command line switches through the new RXI configuration file. However, it cannot obscure the /AP switch nor can it remove the OINSIGHT.exe as the shortcut target. The SRP Application Launcher provides the best of both worlds. It provides the developer with a small EXE file that can be renamed as desired. Through its companion INI file, the developer can customize the command line switches and configure additional features. This results in an EXE file that converts to a shortcut rather easily, giving the application a very custom and professional appearance. OINSIGHT.exe and the requisite command line options are completely obscured. Furthermore, this unique EXE file can be embedded with the application’s custom icon*, removing the constant need to use the Change Icon command button from the shortcut properties dialog box.

 * Third party software or an SDK required. SRP also provides this as a free service to customers who purchase the SRP Application Launcher.

Here is a summary of new OpenInsight 10 launch features and how they are supported by the SRP Application Launcher:

/SI – SingleInstance

Preventing users from launching more than once instance of an OpenInsight application has been a nuisance since the beginning of time. Not only would this create confusion for end users, it would unnecessary consume a user license, potentially causing the “Attempt to log in too many users” message to appear when a legitimate user needed to run the application.

There have been several approaches to resolve this issue, but most of these methods have been unsatisfactory. In some cases, the logic that checked for other instances of the application required that the user actually log in to the application. Thus, the system could be waiting at the OpenInsight login dialog (perhaps hidden by other Windows applications), and the user license would still be in use. Other approaches would be too stringent, only allowing one instance of the OINSIGHT.exe process to launch. This would prevent different OpenInsight-based applications from being launched concurrently. While this may be a rare occurrence, we have seen more than one OpenInsight application – from different vendors – installed and running on the same customer’s machine.

The /SI switch prevents multiple executions of the same OpenInsight application. This is a nice middle ground solution. The SRP Application Launcher tackles this problem through the use of the SRP Launcher ActiveX control. This control comes with the SRP Application Launcher tool, but is optional. It is designed to be added to the application’s entry point form. It serves no GUI purpose (and should be made invisible) but it does communicate with the SRP Application Launcher executable in two special ways. First, when an OpenInsight form is running with this control, all subsequent attempts to run the application will fail, thus enabling single instance control. As an added feature, the currently running application will be brought to focus.

The second way the SRP Launcher control communicates with the executable is through the OnLaunchAttempt event. When attempting to execute an already running application the OnLaunchAttempt event is invoked, passing in any extra command line arguments. This feature makes it easy for third-party applications to communicate with OpenInsight applications. By attempting to launch the EXE file, additional information can be passed through the command line, which could then be used by the target OpenInsight application to respond in a special way, perhaps running a process.

In some cases, it is necessary for stricter control. Hence, we introduced the StrictSingleOIInstance configuration flag. This new feature prevents multiple instances of OINSIGHT.exe from running, regardless of the application.

/MD – minDisplaySecs

Another nuisance with OpenInsight applications is the lifespan of the banner image (aka application splash screen) being directly tied to the loading of OINSIGHT.exe into memory. As machines and networks have become faster, OpenInsight itself is loading quicker. Ordinarily this is a good thing. However, often there are reasons that a developer might want the splash screen to stay up for a little while longer. For instance, while OpenInsight might be off and running, the application entry point form might need a little longer before making itself visible. In these cases, the user is staring at the Windows desktop wondering if the application stopped running.

The /MD switch allows the banner to stay up for a minimum number of seconds. While the Revelation article does not make this clear, we have learned that the OpenInsight entry point form will not load in the background while the banner is still being displayed. However, any application startup processes (i.e., stored procedures which are defined in field 32 of the CFG_AppName SYSENV record), will run in the background.

The SRP Application Launcher provides two INI configuration options for optimum control: SplashScreenDelay and SplashSynchOn. SplashScreenDelay works just like the /MD switch, but the value is in milliseconds rather than seconds. SplashSynchOn allows the application to continue to load completely – including the entry point form – while the splash screen is stays visible. This is perfect for applications that are expected to take a few seconds to launch.

<bannerFile>

The above tag only appears in the XML sample shown in The RXI Files blog post. There is no corresponding command line switch and this is not documented (yet) in the other RXI file posts. What is interesting about this feature is that it appears to allow for a splash screen to be defined without having to use the Logon Banner option from the Application Properties dialog. This is very good news since the current method for associating banner images to OpenInsight applications only updates the OINSIGHT.INI file, which is stored on the local machine. With this method, the developer must find a way to update each and every local OINSIGHT.INI file in order for the banner image to work. A cumbersome task indeed. We have also discovered that the OINSIGHT.INI file will no longer be used as of OpenInsight 10.

The SRP Application Launcher makes it easy to define a universal splash screen much like the RXI bannerFile tag. The launcher’s INI file has a SplashScreenImage configuration option where the path and name of an image can be specified. Additionally, there are SplashScreenBackColor, SplashScreenBorderColor, and EnableBlending options to provide even greater control over the way the banner image is managed.

And More…

We encourage you to look at the other features available with the SRP Application Launcher tool, such as the renaming of system files, auto-registration of COM controls, and launch prevention for times when the application is undergoing maintenance. All of these are designed to provide OpenInsight applications with a high degree of professional appeal.

Leave a Reply