- 1 -
Example of Installation
This is a short tutorial which explain you how to install a universal windows service inside your own
C# software package.
We want to install a service which must be manually started and runs different applications like the
notepad every 20 minutes for example.
Download files
Firstly you have to download the latest version. Therefore you would only need the binaries of UWS
package.
After downloading the packed file you must extract the binaries into a directory you want. Should
be someone inside your installation directories.
Install UWS
Before you could use the installation class you have to copy the files to their working directory or
installation destination because the installation class uses the current path of assembly for service
installation. Also you have to leave the whole UWS files together in one directory.
Now you have to add the following code to your C# installation program. The following includes are
neeeded.
This code example is a part of the installation routine which installs the service with given name,
description and so on. Errors would be recorded in the multi line text box 'txtStatus'.
And now a simple code example for uninstalling the universal windows service.