DFKA
Posts: 4
Joined: Thu Dec 08, 2016 8:41 am

Setting permissions on an installed service.

Hi,

I have created an installer containing a normal application and a service, which runs on a per-user basis.
The program should be able to start/stop the service and change start-mode/credentials, so the current user, not IU (Interactive User), should be granted the required permissions.

I’m able to do this manually through the Service Controller Exe (sc.exe) using SC sdset <service-name> <security descriptor>.

I wanted to hear if this kind of functionality is built into Advanced Installer, or if I need to handle it through a custom action?

Thanks,
DFKA
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Setting permissions on an installed service.

Hello DFKA and welcome to our forums,

Yes, you should be able to install and configure your service under a specific user account. Just take a look on our "Install a service for a custom user" tutorial and let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
DFKA
Posts: 4
Joined: Thu Dec 08, 2016 8:41 am

Re: Setting permissions on an installed service.

I’m not looking for a way to install a service and let it run under a specific user account.

What I am looking for is some way, through the installer, to grant the required Service Permissions (DACL) to a program (User) which is installed along with the service.

The program does not run as administrator but it should be able to Start/Stop the service, change its Start-mode etc.


Currently, I’m using a small homemade program which runs as part of the Advanced Installer, that grants the installing user the needed DACL permissions.
I just wanted to hear if the same feature has been built into Advanced Installer.
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Setting permissions on an installed service.

Hello,

I'm afraid we don't have support to configure user permissions for services. I've added this improvement on our TODO list and hopefully it will be available in a future version of Advanced Installer. Thank you for your suggestion. We will update this thread when such a feature will be available.

Until then as a workaround, you can use your own custom action for this task.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Setting permissions on an installed service.

Hello,

Starting with version 16.2 of Advanced Installer released on August 1st, 2019 we have added a built in custom action (Configure non admin service start) you can use to add start permissions for all non admin accounts.

Also, if you need to configure service permissions only for a specific user account then you can use the custom action approach exposed in our "How to set a Windows Service's permissions through the ServiceControl tool" thread.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”