davidjhomer
Posts: 55
Joined: Wed Jun 08, 2016 3:58 pm
Contact: Website Facebook Skype Twitter

Set "Logon as a service" policy for selected username doesn't work

Hello,

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
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

Thanks,


Dave
Attachments
FullInstallLog.txt
(797.2 KiB) Downloaded 311 times
CENTREL Solutions Ltd
Server audit and documentation tools.
http://www.centrel-solutions.com
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Set "Logon as a service" policy for selected username doesn't work

Hello,

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.

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
davidjhomer
Posts: 55
Joined: Wed Jun 08, 2016 3:58 pm
Contact: Website Facebook Skype Twitter

Re: Set "Logon as a service" policy for selected username doesn't work

Yes all the settings are as you describe but it doesn't work and does not log an error.

I will email the Aip now.

Dave
CENTREL Solutions Ltd
Server audit and documentation tools.
http://www.centrel-solutions.com
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Set "Logon as a service" policy for selected username doesn't work

Hello,

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?

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
davidjhomer
Posts: 55
Joined: Wed Jun 08, 2016 3:58 pm
Contact: Website Facebook Skype Twitter

Re: Set "Logon as a service" policy for selected username doesn't work

Hello,

Yes it is a problem on other 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?


Thanks,


Dave
CENTREL Solutions Ltd
Server audit and documentation tools.
http://www.centrel-solutions.com
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Set "Logon as a service" policy for selected username doesn't work

Hello,

Can you email us a sample project, configured to install the service, along with the resources (the service file/files) which reproduces this issue?

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
davidjhomer
Posts: 55
Joined: Wed Jun 08, 2016 3:58 pm
Contact: Website Facebook Skype Twitter

Re: Set "Logon as a service" policy for selected username doesn't work

Hello,

We have found the bug
  • 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)
DomainUser.png
DomainUser.png (11.98 KiB) Viewed 12227 times

Thanks,


Dave
CENTREL Solutions Ltd
Server audit and documentation tools.
http://www.centrel-solutions.com
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Set "Logon as a service" policy for selected username doesn't work

Hello David,

I'm glad you sorted things out. Let me know if you have any other questions.

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
davidjhomer
Posts: 55
Joined: Wed Jun 08, 2016 3:58 pm
Contact: Website Facebook Skype Twitter

Re: Set "Logon as a service" policy for selected username doesn't work

Hello,

We haven't sorted things out, this is a bug in your software, we can't release until this is fixed.

If the user is in a test environment and they install using the account DOMAIN\Administrator the installation fails.



Thanks,


Dave
CENTREL Solutions Ltd
Server audit and documentation tools.
http://www.centrel-solutions.com
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Set "Logon as a service" policy for selected username doesn't work

Hello Dave,

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!

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
yzotov
Posts: 1
Joined: Wed Jul 12, 2017 11:55 pm

Re: Set "Logon as a service" policy for selected username doesn't work

Hi

In which version this problem is fixed?
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Set "Logon as a service" policy for selected username doesn't work

Hi and welcome to our forums.

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.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Collins
Posts: 138
Joined: Wed Oct 12, 2016 2:57 pm

Re: Set "Logon as a service" policy for selected username doesn't work

Was this resolved with the release of 14.4 as part of the "Log on as a service support misbehaves for domain account" fix?
Dan
Posts: 4513
Joined: Wed Apr 24, 2013 3:51 pm

Re: Set "Logon as a service" policy for selected username doesn't work

Hello,

Indeed, this was fixed in version 14.4 of Advanced Installer released on October 26st, 2017.

Can you please confirm that everything is working as expected?

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Collins
Posts: 138
Joined: Wed Oct 12, 2016 2:57 pm

Re: Set "Logon as a service" policy for selected username doesn't work

Thanks Dan. This seems to work for me, but my scenario may be different from the original poster.

Return to “Common Problems”