MichaelD
Posts: 43
Joined: Tue Jan 12, 2016 10:32 am

Service account variables

Hi

I found some odd behavior when trying to use service account settings with variables.
Our service should run with LocalSystem or a user defined account.

I defined both variables for Username and Password in Install parameters with a value of {}, but it doesn't work.
It also doesn't work when using NT AUTHORITY\LocalSystem as username.

It only works when working without variables and leaving both fields empty, but then I have no option to set a custom account in the installation process.

Kind regards,
Michael
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Service account variables

Hello Michael,

This won't work when setting those properties in "Install Parameters" page to "{}". In this case they won't be empty, but they will be set to the "{}" value as it is.

To achieve what you want you can try to duplicate your service in "Services" page so you have two services: one which installs under "LocalSystem" an the other under a custom user account.

Let us know of this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
MichaelD
Posts: 43
Joined: Tue Jan 12, 2016 10:32 am

Re: Service account variables

Hi Daniel,

I also tried this but I can't configure a service entry as a single component to modify install conditions.
Do I have to create dummy registry entries for this?

Kind regards,
Michael
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Service account variables

Hello Michael,

No, you don't have to create dummy registries. All you need to do is this:
1. go to "Files and Folders" page and under the parent folder where your service file is added add a new subfolder
2. enable the "Install folder content into the parent folder" option for your subfolder and in here add (using the [Add files] toolbar button) your service file again
3. go to "Service" page and add a new service entry for the duplicated service file added in the above subfolder
4. in "Organization" page condition your service components as you need

Please take a look on our "Install files with the same name" article for your references.

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

Return to “Common Problems”