Registry Launch External Apps (application name)

Purpose:

Any program that can be initiated from a command-line operation can be defined as a function and assigned to user groups within Data-Basics software.  Data-Basics uses a combination of Registry and User-Defined Function records to construct the command-line value that launches the external application.

Testing Your Registry Entries
The system does not verify the validity of registry entries. Be sure to test your registry entries after completing them to verify that they are functioning correctly.

Setting Values are Uppercase-Lowercase Sensitive:
The Setting Value is case-sensitive: be sure that you enter the value exactly as specified in the documentation. If the documentation specifies a value of true, do NOT enter True or TRUE.

1. Creating a Registry Entry to define a Link to an External Program

Create a registry entry for the application that you wish to launch.

 Id:             Application name (or whatever else makes sense) and contents:

Setting Key: path Setting Value: full path

to an executable (in the case of crystal report files, each one is its own executable, so each one requires a registry entry). Instead of specifying a path, you may specify a filename extension that defines the application to be launched as shown below)

Setting Key: extension Setting Value: fileextention

This option may be used INSTEAD of the path option above. This option enables you to identify the file extension appropriate for use with the external app.  Following is an example of the old and new setting as it applies to MS Excel:

Registry Id: excel

Setting Key: exe Setting Value: EXCEL.EXE

Old setting ... Setting Key: path Setting Value: C:\Program Files\Microsoft Office\Office
New setting ... Setting Key: extension Setting Value: xls

The new way is preferable because it doesn't need to assume that every SAMPRO user has Excel installed in the same path.  Instead it retrieves the necessary info for xls-type files from the Windows Registry.

Setting Key: parms Setting Value: list of parameters

Specify any parameter that should be applied to the command-line after the executable. For example, this could be the Access database you wish to launch.
         

2. Creating a User-Defined Function to Launch the External Application

Once you have created a registry entry defining the link to the external application, you will next create a user-defined function to actually launch the application.

          Id:  A unique function id.

          Name: The description associated with the user-defined function for the Menu Display.

          Menu Category: Report, or Starter, or Viewer (defines which menu should display the function)

          Application: Application name (from your registry entry)

          Application Parameters

Specify any "additional" parameters that should be applied at the end of the command-line.

3. Examples of Registry and User-Defined Function Pairs

Example: Access

        Registry Id:  access

        Setting Key: path   Setting Value: c:\program files\microsoft\msaccess.exe

         parms= c:\my documents\reports.mdb

 

        User Function Id: accessreport

        User Function Name: Report My Access Report

        Menu Category:`Report

        Application: Access

        Application Parameters: /x myreport

Resulting Command-line:   

c:\program files\microsoft\msaccess.exe c:\my documents\reports.mdb /x myreport

This command will launch the application "access", open the file "report.mdb" , and run the macro "myreport"

Example: Excel

Registry Id:  excel

Contents: exe=EXCEL.EXE
extension=xls

User Function Id: excelclient

         User Function Name: Report Client Spreadsheet

         Menu Category:`Report

         Application: excel

         Application Parameters: \\myserver\excelreport\client.xls

Enhanced Capabilities 

Enhanced capability allows for the specification of the executable "path" in a single registry entry as an "application" definition, enabling many User Defined Functions to be created from a single registry entry.  This is particularly helpful for applications such as Crystal Reports where each files is defined by a unique executable.

 

Create a registry entry with...

          Id:             Application name (or whatever else makes sense) and contents:
          Contents:   exeNameInParms=true

 

Create a user-defined function with:
          Id=unique function id

          Name=description associated with user-defined function for Menu Display

          Menu Category=Report, or Starter, or Viewer --to define which menu should display the function

          Application=Application name

          Application Parameters= the name of the specific executable file

Example

        Registry Id:  Crystal

        Contents:    path= c:\my documents\crystal report files\

        Contents2:  exeNameInParms=true

 

        User Function Id: Report_One

        User Function Name: Report One of My Crystal Reports

        Menu Category:Report

        Application: Crystal

        Application Parameters: report_one.exe