Generating MTS Executables
Using the MTS Explorer, you can generate an application executable that installs and configures a client computer to access a remote server application. The client computer that installs the executable must have distributed COM (DCOM) support, but does not require any MTS server files other than the executable to access a remote MTS server application.
The application executable utility is part of the exporting packages feature in the MTS Explorer. This utility allows you to automatically generate application executables that install a client application and configure the client computer to access a server application on a remote MTS servers. Executables generated by the application executable utility by default will configure a client computer to access the deployment server on which the executable was generated.
You can also configure the Options tab on the Computer property sheet to point client applications to a server other than the deployment server. If you do not enter the name of another server computer before exporting the package to generate an executable, application executables created on the local computer will automatically configure client computers to access server packages on the local computer.
To configure a client application executable to access a server computer other than the local computer:
-
Select My Computer.
-
Right-click and select Properties from the right-click menu.
-
Select the Options tab and enter the name of the remote server in the Remote server name field in the Replication section.
-
Click OK, and export the package to create the application executable.
On the MTS server, the application executable utility automatically creates an executable for the client application.
On the client, the executable automates the following steps:
-
Copies to a temporary directory on the client or server machine and then extracts the necessary client-side files, including type libraries and custom proxy-stub DLLs.
-
Transfers type libraries and proxy-stub DLLs for the server application to the Remote Applications directory in the \Program Files sub-directory. All remote applications are stored in the Remote Applications directory. Each remote application has an individual directory named by the package globally unique identifier (GUID).
-
Updates the system registry with the entries that either enable clients to use the server application remotely (including information that is related to application, class, programmatic, interface, and library identifiers) or allows the server application to run on the server computer.
-
Registers the application so that a user can use the Add/Remove Programs icon in Control Panel to remove it at a later date. All remote applications are prefaced with “Remote Application” so that you can easily find your application in the list of installed components.
-
Deletes files in the temporary directory generated during installation of the application.
When run on a client computer, the client executable copies the necessary proxy-stub DLLs and type libraries to that computer and updates the client’s system registry with information needed by DCOM, including the name of the server computer. Client applications can then access a remote server application.
Before you export a package to create an executable, you must configure your client installation file (clients.ini). You can customize the installation of your client to include additional files, such as client executables, application documentation, or a simple readme. For example, the clients.ini file, which is in the \Clients sub-directory, can be modified to combine installation of client executables for several different applications.
To customize installation:
-
Open the clients.ini file, which is located in the \clients sub-directory.
-
Below the Client Application Files heading, enter the path to the directory in which you want the source code installed on the client computer. For example,
Source Path=c:\pgram files\mtx\test\vb bank
-
Below the ClientApplicationInstallCommands heading, enter the names of the files that you wish to install. Use triple-brackets to enclose the names of the files that you want to install. For example:
1=notepad {{{readme.txt}}}
2={{{vbbank.ex}}}}
-
Below the ClientApplicationSetup heading, indicate if you would like to enable the ExploreApplication setup option by typing “Y” for yes or “N” for no. For example, the following entry would display the application immediately after setup so that the client could create a shortcut to the desktop:
ExploreApplication=Y
After you have customized the clients.ini file, you can use the MTS Explorer to export the server package to create a client executable.
To create a client executable:
-
Install the server application using the Package Wizard if you have not already done so.
-
If you would like your clients to access a server other than the deployment server on which you are creating the executable, follow these steps.
-
Select My Computer in the left pane of the Explorer.
-
Right-click and choose the Properties option from the right-click menu.
-
Click the Options tab. In the Remote Server Name box, enter the server name that you want clients to access. For example:
\\anotherservermachine
-
Export your package from the server on which your server application is installed to another server. Specify a new filename (YourNewFileName) as the package export filename, and place the exported package in your MTS directory.
-
Locate the folder into which you exported your package. You will see a Clients subdirectory that contains a single file named YourNewFileName.exe. Exporting an existing package in the MTS Explorer generates a "Clients" subdirectory beneath the directory to which you exported the package. The Clients sub-directory contains a single executable with the name specified during package export. When run on any client supporting DCOM, this executable installs all the necessary information for remote clients to access the server application.
Important Do not run this client executable file on your server computer. Running the client executable on the server computer removes the registry entries required to run the server package. If you make this mistake, you must remove the application using the Add/Remove Programs property sheets in the Control Panel. Then delete and re-install the package using the MTS Explorer.
Distributing the Client Executable
The MTS Explorer automates packaging and installing client applications into executables for distribution. Distribute those executables by using one of the following methods:
-
Sharing a directory so that clients can copy the executable and run it on their computers.
-
Sending an email attachment so that clients can save and run the executable on their computers.
-
Incorporating an executable into an HTML script using the <OBJECT> tag. The <OBJECT> tag allows the browser to download the application from a specified object store location to the client machine if the client initiates an event on the HTML page (such as clicking a button). Using the <OBJECT> tag to distribute executables facilitates upgrading executables, since the browser automatically checks the client’s registry for the current version of the application. If the existing executable is outdated, the browser downloads the latest version from the object store.
-
Using Microsoft System Management Server (SMS) to “push” the distribution of your application from a central location to tens or hundreds of computers at once. Note that you must install the client application itself after installing the application on remote computers.
Removing the Client Executable
Clients can remote the client executable through the Add/Remove option in the Control Panel. Applications installed by MTS executables begin with "Remote Application" in the Install/Uninstall list. To remove the executable, select the appropriate application and click Remove.
See Also
Exporting MTS Packages, Building an MTS Package for Export