.NET Based OPC UA Client/Server SDK
3.1.3.516
|
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.
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:
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 opens all of the ports used by the application endpoints. It also creates an exception for the application executable file. Ports for endpoints that use 127.0.0.1
as the domain are not opened.
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:
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.
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:
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 closes any ports used by the application endpoints and removes the executable file from the exception list.
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.