Service not starting using supplied credentials - Advanced Installer Community
jusher
Posts: 195
Joined: Thu Dec 22, 2011 12:00 pm

Service not starting using supplied credentials

Hi,

I have created a service in AI and if I leave the Account/UserName/Password as blank it (presumably) uses the LocalSystem account and works no problem.

I now want to supply the account that the service should run under instead. I have defined two properties ADMIN_USER and ADMIN_PASSWORD, which I substitute into these two fields. I have also on a separate occasion, just manually typed the name Administrator and the relevant password. I have also tried selecting the name from the dropdown on the user name. I have also checked the box that says 'Set logon as service policy for selected user name". None of this works and I get: -

Starting Services

Then Msgbox with: -
Service 'Service name' failed to start verfy that you have sufficient privileges to start system services'

As I require this facility what do you suggest I do?

Regards,
John
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Service not starting using supplied credentials

Hi John,

I'm not sure why you encountered the this behavior.
In order to have a better view about this, can you please send us the .AIP (project file) and a verbose log of the installation process to support at advancedinstaller dot com so we can investigate it? If it contains confidential information you can send us a small test project which reproduce this behavior.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jusher
Posts: 195
Joined: Thu Dec 22, 2011 12:00 pm

Re: Service not starting using supplied credentials

Hi Dan,

This is working, with a supplied Username and password.

However if I set these to "" for Local System account it fails with the permissions error.

If I set the variables to {} for Local System Account it works.

What is the difference between setting a property using {} and ""? I think this is my problem.
Is it a NULL v Blank String problem?

Regards,
John
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Service not starting using supplied credentials

Hi John,

Indeed, when using the {}, the property is reset for a null value.
When using "", the property is a blank string.

If you have other questions, please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jusher
Posts: 195
Joined: Thu Dec 22, 2011 12:00 pm

Re: Service not starting using supplied credentials

Thank you.

John
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Service not starting using supplied credentials

You're welcome John,

If you have other questions, please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”