.NET Based OPC UA Client/Server SDK  3.3.3.537
Installation Process

Table of Contents

Overview

OPC UA Applications that are managed by ApplicationInstance are parsing the command line arguments by default. Here the usage of the arguments dealing with the installation process are described.

The /install argument makes changes to the machine configuration in order to allow an application built with the SDK to run. It is used rarely by an administrator and can be used with an installer custom build step. It is intended to leave the application in a state that is ready to use with security enabled.

The /uninstall argument undoes the machine configuration changes made by the /install argument. The uninstall process will not delete files created by the application or during install.

If the /silent option is used as well the install process will always succeed and any errors are placed in the application log file - if enabled(!). If it is not used an error will cause an exception and the process halts.

Install

The install process starts if the /install command is processed. At this point the configuration has already been loaded by the Start method. The install activity is shown in the following diagram:

l3baselibinstallprocessinstall.png

The configuration file should have an InstallationSettings element as defined above. If not suitable defaults are used.

The PreInstallProcessing action allows the Application Developer to customize the install process by adding additional steps before the default installation process starts.

The CheckConfiguration action validates the configuration and sets values to suitable defaults. It is the same as the action described in the method Start. The AutoCreateCertificate flag is always set to TRUE before this action is executed.

The RegisterWithLDS action loads the LDS configuration file, determines where its trust list is located and adds the application's certificate to that trust list. This step is performed only if endpoints are defined for the application.

The ConfigureFirewall action calls the virtual OpenFirewallPorts method in ApplicationInstance class. Implement this mehtods to set your Firewall configuration.

The ConfigureService action registers the application as a Windows-Service. Any existing service registration is deleted.

The SetFilePermissions action sets the permissions on the various files and directories necessary to run the application. These files and directories are:

  1. The application certificate private key;
  2. The application configuration file;
  3. The application executable file;
  4. The trusted certificate list and issuers list;
  5. The rejected certificate list;
  6. The application trace log file directory;

The account group specified by the UsersGroup in the InstallationSettings must have read access to all of the above. The log file directory and rejected certificate list require write access as well. If the application is installed as a service the SYSTEM account will also have these rights granted. This is in addition to any account identified with the ServiceUserName.

The account group specified by the AdministratorsGroup in the InstallationSettings must also have write access to all of the above. The PostInstallProcessing action allows the application developer to customize the install process by adding additional steps after the default installation process completes.

Uninstall

The uninstall process starts if the /uninstall command is processed. At this point the configuration has already been loaded by the Start method. The uninstall activity is shown in the following diagram:

l3baselibinstallprocessuninstall.png

The configuration file should have an InstallationSettings element as defined above. If not suitable defaults are used.

The PreInstallProcessing action allows the application developer to customize the uninstall process.

The CheckConfiguration action validates the configuration and sets values to suitable defaults. It is the same as the action described in the method Start.

The UninstallService action stops and unregisters the service.

The ConfigureFirewall action calls the virtual CloseFirewallPorts method in ApplicationInstance class. Implement this mehtods to reset your Firewall configuration.

The DeleteCertificate action removes the application certificate from all trust lists and deletes the private key. The private key is not deleted if the DeleteCertificateOnUninstall property is FALSE.

The PostInstallProcessing action allows the application developer to customize the uninstall process.