Windows Service fail with Account Properties - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

markohzs
Posts: 1
Joined: Wed Oct 03, 2012 7:30 pm

Windows Service fail with Account Properties

have a project for a Windows Service; I collect the Service Account thru LogonInformationDlg; when I actually set the logon information everything works; but when I leave all fields blank (I expect the service use a local account) fails with an error
Error
Error
InstallError.png (7.67 KiB) Viewed 3808 times
(see other attachments).

I'm using:
User name: [SERVICE_DOMAIN_USER]
Password: [USER_PASSWORD]

Thanks
Attachments
ERecordingCA.js
Custom Action
(5.59 KiB) Downloaded 371 times
log7503.log
MSI log
(516.48 KiB) Downloaded 347 times
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Windows Service fail with Account Properties

Hello and welcome to Advanced Installer forums,

I'm not sure why you are encountering this behavior. Please take a look on our "Getting Error Message while installing services" thread which debates this issue.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Jimmy
Posts: 36
Joined: Thu Apr 12, 2012 1:13 pm

Re: Windows Service fail with Account Properties

I assume, you intend to do the Installation of the service operated by a service user (if LogonInformationDlg is filled), or by "Local System" (If the LogonInformationDlg is leaved empty.

I had a similar situation, and resolved it this way:
Install the service without Login Information (so it is installed with "Local System" as the Service User.
Before the LognInformationDlg I inserted a "ServiceLogonTypeDlg, which asks if the service sould be run as Local System, or as a Domain / Local User and set a property "RUNS_AS_SYSTEM" or "RUNS_AS_USER".

According to this property I run a couple of custom actions (GrantLogonAsAService, SetServiceLogon) after the "Install Services" Standard Action, which does
  • ntrights.exe -u [SERVICE_USER] +r SeServiceLogonRight (GrantLogonAsAService)
  • sc config [ServiceName] type= own start= auto obj= [SERVICE_USER] password= [SVC_USR_PASSWORD] (SetServiceLogon)
Both Custom actions have the condition RUNS_AS_USER AND SERVICE_USER <> ""

I was not able to to it in other way.

hope this helps
Jimmy

Return to “Common Problems”