We have an installer which is installing a service as [SERVICE_DOMAIN\SERVICE_USERNAME] and the Set "Logon as a service" policy for selected username option is checked.
The service installs but cannot start because the account does not have the logon as a service right.
ServiceCannotStart.png (19.12 KiB) Viewed 12284 times
There are no errors in the log
We have another installer with the exact same settings which does work
In order to run a service under a user account, the user for which you install the service must be an Administrator. You need to take the following steps:
-go to the Install Parameters page and create these properties: SERVICE_USER and SERVICE_PASSWORD
-set the values of these properties to the default username and password of the service
Any user account must be specified in this form: <Domain_Name>\<User_name>. For local user accounts, use a dot (.) as the domain name: .\<User_name>. For example, the built-in Administrator account can be specified like this: .\Administrator
-go to the "Services" page and select your service
-in the "Service Properties" page set the "User Name" field to [SERVICE_USER] and the "Password" field to [SERVICE_PASSWORD]
-check Set "Log on as a service" policy for selected username option
If this doesn't help, please send us the .AIP (project) of the installation to support at advancedinstaller dot com so we can investigate them.
We received your .AIP project.It appears to be configured correctly. Can you install the service manually outside Advanced Installer? If so, can you reproduce this issue on multiple machines?
Yes I can install it usually (we used to use NTRIghts to perform this action which worked) it's only now that we've moved to your checkbox to assign the rights.
I don't understand why there are no errors in the log?
Install the service as DOMAIN\Administrator (where DOMAIN is the name of the domain)
The local administrator is given log on as a service rights
On a domain controller this works correctly (as the domain controllers local Administrator account is effectively the domain Administrator account)
On a domain member this fails (the local Administrator account has the privilege but the domain Administrator account that is configured to run the services does not).
If you install the service using another, custom user account this works correctly (as per the screenshot)
I'm sorry for my previous post, I wrongly understood that you were referring to a bug in your workflow.
We have further investigated your issue and indeed we can confirm that this is an Advanced Installer Bug. The Log on as a service policy is not set correctly for roaming user accounts. A fix will be available in the a version of Advanced Installer, thank you for bringing it to our attention. Until then, you could avoid using our "Set Log on as a service policy for selected username" option and set the policy through a custom action with sequence. This custom action should be placed before "Add Resources" in "Install Execution Stage". Please take a look on a method described here : C#. How to programmatically grant User Log On as a Service
Hope this helps! Please let me know if you have any other questions!
I'm afraid that this problem was not fixed yet and, unfortunately, I cannot give you an ETA for now. However, we will update this thread when the fix will be available.