janalphenaar
Posts: 18
Joined: Thu Jul 31, 2008 8:47 am

Run service under NetworkService

Hi,

I have just downloaded the free version of Advanced Installer version 6.9.1.

My goal is to run MyService, installed by the MSI, under the preinstalled rights “Network Service”. To accomplish this, I have carefully read the page http://www.advancedinstaller.com/user-g ... rvice.html.

When the MSI is installed on the client machine, it looks like everything was installed correctly. When looking at the Windows services MyService is installed as NetworkService. But if I start MyService manually, it gives me the error message “Could not start the service on Local Computer Error 1053: The service did not respond to the start or control request in a timely fashion”. Now when I manually reconfigure MyService as NetworkService on the client machine, it starts fine.

Everything is configured as described on the web page, for convenience the configuration information is displayed as follows.

Install Parameters
SERVICE_PASSWORD (value test)
SERVICE_USER (value NT AUTHORITY\NetworkService).

Custom Action
Source Path APPDIR\bin\ntrights.exe
Command Line: -u [SERVICE_USER] +r SeServiceLogonRight
Execution Properties: Asynchronous execution, do not wait for return
Execution Options: Immediate execution
Scheduling Options: Always Execute
Execution Condition NOT installed

Services
User Name: [SERVICE_USER]
Password: [SERVICE_PASSWORD]

Note that I am uncertain about the password I have to supply in SERVICE_PASSWORD. I have heard that no password should be supplied with the NetworkService. Unfortunately it is not possible to provide Advanced Installer with an Install Parameter with no content. Even after removing the password manually from MyService on the client machine after installation, it gives me the same error message as before. This could indicate that something is wrong the rights settings configured by Advanced Installer.

Any help is appreciated.

Regards,

Jan
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Run service under NetworkService

Hi Jan,

Thank you for your interest in Advanced Installer.

Please note that you don't need to use the "ntrights" custom action to install a service under the local system account. After configuring the service you can simply set these fields in the Service Properties page:

Code: Select all

User Name:  NT AUTHORITY\NetworkService
Password:
The "Password" field should be empty because the NetworkService account doesn't use a password.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
janalphenaar
Posts: 18
Joined: Thu Jul 31, 2008 8:47 am

Re: Run service under NetworkService

Hi Cosmin,

Thanks for your reply.

I tried this myself as well, but the OK button is not clickable when no value is inserted. Is there any way around this ?

Regards,

Jan
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Run service under NetworkService

Hi Jan,

Please note that I wasn't referring to creating a property in the "Install Parameters" page. Indeed, a property initialized here cannot have an empty value.
I was referring to the "Service Properties" pane in the "Services" page (the pane is shown when selecting a service). In this pane you can specify the user name and the password of the service.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”