Page History
Search this documentation
Livesearch | ||
---|---|---|
|
Using the SRP Application Launcher
After the SRP Application Launcher has been installed there will be several files (in addition to this read me document) added to your OpenInsight folder:
- SRPApplicationLauncher.exe
- SRPApplicationLauncher.INI
- SRPApplicationLauncher.png
- SRPLauncher.ocx
Each of these files is documented below.
SRPApplicationLauncher.exe
This is the actual program that launches OINSIGHT.exe for you. You can rename it to anything you want (e.g. MyApp.exe). The icon can only be changed using a resource editing tool such as Resource Hacker or Icon Changer. Alternatively, if you send us an icon, SRP will do this for you at no charge.
SRPApplicationLauncher.ini
Configuration information for the launcher is stored here. This file must be in the same directory as SRPApplicationLauncher.exe. You may rename this file as long as it matches the name of the launcher (e.g. MyApp.exe and MyApp.ini). If you open this file up in a text editor most of the information should be self-explanatory. For detailed information, see the references that follow:
Launcher
This section of the INI contains settings for the launcher itself.
SourceExtensions=DL~;EX~
Use this to have the launcher automatically rename any files with the extensions indicated. This is handy when you need to replace files that are normally in use by the application (like a resource DLL). By copying in a renamed version of that file, the SRP Application Launcher will rename it before OpenInsight is launched and locks it up. Note that each extension is separated by a semi-colon and therefore semi-colons cannot be in the extension itself.
DestinationExtensions=DLL;EXE
Here are the extensions that the SourceExtensions entry will be renamed to. There is a one-to-one correspondence.
RegisterFiles=file1.dll;file2.ocx
Use this to register DLL and OCX files. You may use relative paths, fully qualified paths, and spaces. This is useful if you need to be certain that an OCX file (such as any SRP OCX) is registered before OpenInsight even starts.
SplashScreenImage=SRPApplicationLauncher.png
Use this to identify the splash screen image you wish to use for your application, assuming you want the launcher to display it for you. You can store this image in a sub-directory (e.g. BMPS\splash.bmp), in a resource DLL (e.g. Images.DLL#SPLASH), or in a zip file (e.g. Imags.zip#splash.png).
As you may have noticed, you may load jpegs, gifs, pngs, bmps, psds, and more. If the image contains an alpha channel (e.g. 32-bit bitmap or png) then the splash screen will utilize it. However, alpha blended windows are only supported in Windows 2000 or later. In Windows NT and earlier, alpha blended images are drawn over a white background with a black border. (See SplashScreenBackColor and SplashScreenBorderColor below).
If you use the launcher to load the splash screen then you will want to replace the normal application splash screen with a 1-byte BMP. The launcher will always display the splash screen at the topmost level so the OpenInsight splash screen will be hidden.
SplashScreenBackColor=White
Use this to set the color that will appear behind your splash screen in Windows NT and earlier. If your splash screen image has no alpha channel, then this color will never be seen. Colors can be any color as described in the Colors topic of the OLE Help document.
SplashScreenBorderColor=Black
Use this to set the color of the border that surrounds your splash screen (only in Windows NT and earlier). Colors can be any color as described in the Colors topic of the OLE Help document.
SplashScreenDelay=4000
Indicate the number of milliseconds you want the launcher to display the splash screen. Unlike OpenInsight, which displays the splash screen for the length of time it takes to load the application, you control how long you want it to stay up.
SplashSynchOn=0
This allows the launcher to load OpenInsight in the background while the splash screen is being displayed or it will only launch OpenInsight after the launcher is ready to close down (i.e. after the SplashScreenDelay time has completed). A value of 0 means OpenInsight will load in the background. We generally recommend this because it allows OpenInsight to fully load by the time the launcher and splash screen are done, enabling the end user to begin using the application immediately.
EnableSplashScreen=1
This allows you to turn on and off the splash screen.
EnableBlending=1
This allows you to turn on and off alpha blended splash screens. Sometimes, Windows won’t show alpha blended windows, such as when using Terminal Server. Sometimes, the SRP Launcher doesn’t know alpha blending is not supported, so you have to let it know when not to use it. If you’re splash is not appearing (and you’re not seeing any errors), try setting this property to 0.
PreventExecution=0
This allows you to prevent users from launching your application. This can be useful if you have an automated process that requires users to remain out of the system. Once the process is completed, you can set this property back to 0 to allow users to logon.
PreventExecutionMessage=MessageText
When the PreventExecution flag is set, users see a message telling them of the prevention. By default, the message is, “Application launch prohibited. See network administrator for details.” Use this property to set any message you desire.
TransparentColor=None
This property allows you to set the color that will be considered transparent and is used only by image files without an alpha channel, such as BMP files.
StrictSingleOIInstance=0
This property, when set, will only allow one instance of OINSIGHT.EXE to run on the system. This is useful if you have only one OI app on a client machine and want to make extra sure they don't run more than one copy. However, if you have two different OI applications, then leave this set to 0 and use the SRP Launcher solution instead.
Oinsight
The OINSIGHT section of the INI file contains everything necessary to launch OpenInsight.
OpenInsight=.\Runtime\Oinsight.exe
The OpenInsight path and file executable relative to the SRP Launcher. This tells the launcher where to find OINSIGHT.exe. The SRP Application Launcher should always be in the root OpenInsight directory, so this is only useful to people who keep OINSIGHT.exe in a subfolder underneath the normal location of the system files (i.e. where split environments are maintained so development files are in one subfolder while runtime files are in another subfolder).
Application=EXAMPLES
The OpenInsight application name. This gets automatically put into the /AP= command line parameter.
Username=USER
The database user. This gets automatically put into the /UN= command line parameter.
Password=PW
The password (if any) for the user. This gets automatically put into the /PW= command line parameter.
DevelopmentMode=0
Flag to run OpenInsight in development or runtime mode. This gets automatically put into the /DV= command line parameter.
HideOinsight=1
Flag to hide OpenInsight. This gets automatically put into the /HI= command line parameter.
HideEngine=1
Flag to hide OpenEngine. This gets automatically put into the /HE= command line parameter.
HideBanner=1
Flag to hide the OpenInsight default splash screen. This gets automatically put into the /BN= command line parameter. (Works only in OpenInsight 8.0.3 or later).
CustomCaption=MYAPP
Flag to add the application name to the Oinsight.exe task manager caption. This gets automatically put into the /CA= command line parameter. Cannot contain spaces. (Works only in OpenInsight 8.0.3 or later). Note: The /CA= command line parameter always converts the value to uppercase. This is a feature of OpenInsight, not the SRP Application Launcher.
AdditionalParameters=/X=Value /Y=Value /Z=Value
Appends additional custom parameters to the oinsight.exe command line. These are passed as is. It is up to you to supply well formed and valid parameters.
Commands
Used to execute DOS commands/programs during launch. Each parameter must be named CommandN, where N is an incremental value starting with one. For example:
[Commands]
Command1=test.bat
Command2=SRPScheduleServer.exe
Command3=ping www.srpcs.com
Note how each command's N value is incremented by one. You can include as many commands as you want as long as you follow this convention. Each command is executed silently--with no feedback to the user--after the splash screen is displayed but before OpenInsight launches. The longer these commands take, the more likely your user will think the launch has stalled.
SRPApplicationLauncher.PNG
This is the default splash screen shamelessly advertising SRP Computer Solutions, Inc. You can use any image you want for a splash screen, but feel free to share this with your friends.
SRPLauncher.ocx
This is the SRP Launcher Control. We include it with the SRP Application Launcher because it is used to provide the enforcement of single-instance execution of an application. You will need to put this on your main application form and use the ProgID of SRP.Launcher.1. Set the OLE control to be invisible using the control properties dialog. The SRP Launcher executable communicates directly with this OLE control to establish whether or not another instance is already running. If it is, then the launcher aborts the attempt to run OINSIGHT.exe again and brings the main application to focus.
Additionally, an OLE event, OnLaunchAttempt, will fire. The syntax is:
OnLaunchAttempt(CommandLineParams)
It is optional if you want to intercept this event. One use of this event is to capture regular or custom command line parameters. This will allow the application to determine if they are important and if there is a need to respond. The command line parameters are passed in the CommandLineParams parameter of the event. For example, you could check for a request to run a backup:
Convert @LOWER.CASE to @UPPER.CASE in CommandLineParams
Locate "/B" in CommandLineParams using " " setting Pos then
Call Run_Backup_Process()
end
Because this is an OLE control, it will have to be registered. From a command line, type the following:
regsvr32 <path>\SRPLauncher.ocx
OCX files can be located anywhere. However, it is recommended that you either leave it in your root OpenInsight folder or move it to your System32 folder.
Search this documentation
Livesearch | ||
---|---|---|
|
Popular Topics
Popular Labels | ||||
---|---|---|---|---|
|
Featured Pages
Content by Label | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|