Installing a Windows Service to Run Under a Specific Domain Accoun

E

EagleRed

I am writing a Windows service using VS2008 (.NET 3.5). I have a setup
project associated with the service project in the same solution. I will
run it under Windows 2003 Server. I have two issues.

First, when I install it from VS2008, it does not display in the list of
services.

Secondly, the installation wizard does not prompt for the account it is to
run under. In the past I was allow to enter the credentials under which the
service was to run.

I would appreciate any guidance on how to resolve these issues.

Thank you,
Eagle
 
E

EagleRed

Additional information: I installed the service from the setup project in
the solution. I then ran the installutil command, installutil
[ServiceSetup].exe and got the content shown below in the install log.

I looked in the services list and the service was not listed. Where is it
if it is already installed? How do I find it to start it since it is marked
for manual start?

**** INSTALL LOG

C:\Program Files\ColtInternational\FAA\AIDAP>installutil
AIDAPRetrievalService.e
xe
Microsoft (R) .NET Framework Installation utility Version 2.0.50727.4016
Copyright (c) Microsoft Corporation. All rights reserved.


Running a transacted installation.

Beginning the Install phase of the installation.
See the contents of the log file for the C:\Program
Files\ColtInternational\FAA\
AIDAP\AIDAPRetrievalService.exe assembly's progress.
The file is located at C:\Program
Files\ColtInternational\FAA\AIDAP\AIDAPRetriev
alService.InstallLog.
Installing assembly 'C:\Program
Files\ColtInternational\FAA\AIDAP\AIDAPRetrieval
Service.exe'.
Affected parameters are:
logtoconsole =
assemblypath = C:\Program
Files\ColtInternational\FAA\AIDAP\AIDAPRetrievalSer
vice.exe
logfile = C:\Program
Files\ColtInternational\FAA\AIDAP\AIDAPRetrievalService.
InstallLog
Installing service RetrievalSvcMgr...
Creating EventLog source RetrievalSvcMgr in log Application...

An exception occurred during the Install phase.
System.ComponentModel.Win32Exception: The specified service already exists

The Rollback phase of the installation is beginning.
See the contents of the log file for the C:\Program
Files\ColtInternational\FAA\
AIDAP\AIDAPRetrievalService.exe assembly's progress.
The file is located at C:\Program
Files\ColtInternational\FAA\AIDAP\AIDAPRetriev
alService.InstallLog.
Rolling back assembly 'C:\Program
Files\ColtInternational\FAA\AIDAP\AIDAPRetriev
alService.exe'.
Affected parameters are:
logtoconsole =
assemblypath = C:\Program
Files\ColtInternational\FAA\AIDAP\AIDAPRetrievalSer
vice.exe
logfile = C:\Program
Files\ColtInternational\FAA\AIDAP\AIDAPRetrievalService.
InstallLog
Restoring event log to previous state for source RetrievalSvcMgr.

The Rollback phase completed successfully.

The transacted install has completed.
The installation failed, and the rollback has been performed.
 
E

EagleRed

MY BAD. I found the service. Its name was different from the installation
name. I still need to run the service under a specific domain account and
not LocalService.

Additional information: I installed the service from the setup project in
the solution. I then ran the installutil command, installutil
[ServiceSetup].exe and got the content shown below in the install log.

I looked in the services list and the service was not listed. Where is it
if it is already installed? How do I find it to start it since it is marked
for manual start?

**** INSTALL LOG

C:\Program Files\ColtInternational\FAA\AIDAP>installutil
AIDAPRetrievalService.e
xe
Microsoft (R) .NET Framework Installation utility Version 2.0.50727.4016
Copyright (c) Microsoft Corporation. All rights reserved.


Running a transacted installation.

Beginning the Install phase of the installation.
See the contents of the log file for the C:\Program
Files\ColtInternational\FAA\
AIDAP\AIDAPRetrievalService.exe assembly's progress.
The file is located at C:\Program
Files\ColtInternational\FAA\AIDAP\AIDAPRetriev
alService.InstallLog.
Installing assembly 'C:\Program
Files\ColtInternational\FAA\AIDAP\AIDAPRetrieval
Service.exe'.
Affected parameters are:
logtoconsole =
assemblypath = C:\Program
Files\ColtInternational\FAA\AIDAP\AIDAPRetrievalSer
vice.exe
logfile = C:\Program
Files\ColtInternational\FAA\AIDAP\AIDAPRetrievalService.
InstallLog
Installing service RetrievalSvcMgr...
Creating EventLog source RetrievalSvcMgr in log Application...

An exception occurred during the Install phase.
System.ComponentModel.Win32Exception: The specified service already exists

The Rollback phase of the installation is beginning.
See the contents of the log file for the C:\Program
Files\ColtInternational\FAA\
AIDAP\AIDAPRetrievalService.exe assembly's progress.
The file is located at C:\Program
Files\ColtInternational\FAA\AIDAP\AIDAPRetriev
alService.InstallLog.
Rolling back assembly 'C:\Program
Files\ColtInternational\FAA\AIDAP\AIDAPRetriev
alService.exe'.
Affected parameters are:
logtoconsole =
assemblypath = C:\Program
Files\ColtInternational\FAA\AIDAP\AIDAPRetrievalSer
vice.exe
logfile = C:\Program
Files\ColtInternational\FAA\AIDAP\AIDAPRetrievalService.
InstallLog
Restoring event log to previous state for source RetrievalSvcMgr.

The Rollback phase completed successfully.

The transacted install has completed.
The installation failed, and the rollback has been performed.


I am writing a Windows service using VS2008 (.NET 3.5). I have a setup
project associated with the service project in the same solution. I will
run it under Windows 2003 Server. I have two issues.

First, when I install it from VS2008, it does not display in the list of
services.

Secondly, the installation wizard does not prompt for the account it is to
run under. In the past I was allow to enter the credentials under which the
service was to run.

I would appreciate any guidance on how to resolve these issues.

Thank you,
Eagle
 
E

EagleRed

The two issues are resolve as follows:

1. I need to look for the service name that I used in naming the service
designer. This is the class name that is derived from ServiceBase.

2. The installation wizard did not prompt for the account under which the
service is to run. However, I can change it by right-clicking the service
entry in the services list and using the properties dialog on the "LogOn" tab.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top