-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
WiX Cookbook
By :
When you develop a Windows service and you want it to start automatically when the computer is turned on, you'll need to run that service as a user that has the Log on as a service security setting. In this recipe, you will learn how to apply this attribute to a new user account that we will create.
To prepare for this recipe, create a new setup project and call it LogonAsServiceInstaller.
Add the LogonAsService attribute to the User element, as outlined in the following steps:
Add UtilExtension to the project by right-clicking on the References node in Solution Explorer and going to Add Reference... | WixUtilExtension.dll | Add | OK.
Add the UtilExtension namespace to the Wix element:
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
Add a User element within a component and set its Name attribute to the name of the new user you'd like...
Change the font size
Change margin width
Change background colour