Hi,
In order to condition the installation of the service you can use the components in the "Organization" page. These are the steps:
- in the"Custom Actions" page you create 2 "Property set with formatted" custom actions under the "InstallUISequence" -> "CostFinalize" folder (you can add the "CostFinalize" standard action by using the "Show standard action" button on the toolbar)
- the first custom action looks like this:
Code: Select all
Property Name: ACCOUNT
Formatted Text: NETWORK SERVICE (or "NT AUTHORITY\NETWORK SERVICE")
Expression: VersionNT=502 (this field is in the "Execution Condition" section)
For more information on the VersionNT property look here:
http://msdn2.microsoft.com/en-us/library/aa370556.aspx
- the second custom action looks like this:
Code: Select all
Property Name: ACCOUNT
Formatted Text: SYSTEM
Expression: VersionNT<>502 (this field is in the "Execution Condition" section)
- in the "Services" page you add your service and in the "User Name" field you set
[ACCOUNT]
- you leave the "Password" field empty because these accounts don't have passwords.
Regards,
Cosmin