Windows Service not installing.

T

tshad

I have a small Windows Service program that just has a timer on it and it
built fine.

I try to install it using InstallUtil and I get the following message:

System.ComponentModel.Win32Exception: The account name is invalid or does
not exist, or the password is invalid for the account name specified

I am in the same folder my program is in (MyService.exe). I assume it has
to do with Logon Credentials.

What do I do to get this installed?

Here is the whole install problem with Path:

****************************************************************************
****************
C:\DotNetProjects\MyService\bin>installUtil
"c:\DotNetProjects\MyService\bin\MyS
ervice.exe"
Microsoft (R) .NET Framework Installation utility Version 1.1.4322.573
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.


Running a transacted installation.

Beginning the Install phase of the installation.
See the contents of the log file for the
c:\dotnetprojects\myservice\bin\myservi
ce.exe assembly's progress.
The file is located at c:\dotnetprojects\myservice\bin\myservice.InstallLog.
Installing assembly 'c:\dotnetprojects\myservice\bin\myservice.exe'.
Affected parameters are:
assemblypath = c:\dotnetprojects\myservice\bin\myservice.exe
logfile = c:\dotnetprojects\myservice\bin\myservice.InstallLog
Installing service Service1...
Creating EventLog source Service1 in log Application...

An exception occurred during the Install phase.
System.ComponentModel.Win32Exception: The account name is invalid or does
not ex
ist, or the password is invalid for the account name specified

The Rollback phase of the installation is beginning.
See the contents of the log file for the
c:\dotnetprojects\myservice\bin\myservi
ce.exe assembly's progress.
The file is located at c:\dotnetprojects\myservice\bin\myservice.InstallLog.
Rolling back assembly 'c:\dotnetprojects\myservice\bin\myservice.exe'.
Affected parameters are:
assemblypath = c:\dotnetprojects\myservice\bin\myservice.exe
logfile = c:\dotnetprojects\myservice\bin\myservice.InstallLog
Restoring event log to previous state for source Service1.

The Rollback phase completed successfully.

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

C:\DotNetProjects\MyService\bin>
****************************************************************************
*************

Thanks,

Tom
 
T

tshad

tshad said:
I have a small Windows Service program that just has a timer on it and it
built fine.

I try to install it using InstallUtil and I get the following message:

System.ComponentModel.Win32Exception: The account name is invalid or does
not exist, or the password is invalid for the account name specified

I am in the same folder my program is in (MyService.exe). I assume it has
to do with Logon Credentials.

What do I do to get this installed?

Here is the whole install problem with Path:

****************************************************************************
****************
C:\DotNetProjects\MyService\bin>installUtil
"c:\DotNetProjects\MyService\bin\MyS
ervice.exe"
Microsoft (R) .NET Framework Installation utility Version 1.1.4322.573
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.


Running a transacted installation.

Beginning the Install phase of the installation.
See the contents of the log file for the
c:\dotnetprojects\myservice\bin\myservi
ce.exe assembly's progress.
The file is located at c:\dotnetprojects\myservice\bin\myservice.InstallLog.
Installing assembly 'c:\dotnetprojects\myservice\bin\myservice.exe'.
Affected parameters are:
assemblypath = c:\dotnetprojects\myservice\bin\myservice.exe
logfile = c:\dotnetprojects\myservice\bin\myservice.InstallLog
Installing service Service1...
Creating EventLog source Service1 in log Application...

An exception occurred during the Install phase.
System.ComponentModel.Win32Exception: The account name is invalid or does
not ex
ist, or the password is invalid for the account name specified

The Rollback phase of the installation is beginning.
See the contents of the log file for the
c:\dotnetprojects\myservice\bin\myservi
ce.exe assembly's progress.
The file is located at c:\dotnetprojects\myservice\bin\myservice.InstallLog.
Rolling back assembly 'c:\dotnetprojects\myservice\bin\myservice.exe'.
Affected parameters are:
assemblypath = c:\dotnetprojects\myservice\bin\myservice.exe
logfile = c:\dotnetprojects\myservice\bin\myservice.InstallLog
Restoring event log to previous state for source Service1.

The Rollback phase completed successfully.

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

C:\DotNetProjects\MyService\bin>
****************************************************************************
*************

I also have a file in my bin folder - MyService..InstallLog that has this in
it:

**********************************************************************
C:\DotNetProjects\MyService\bin>installUtil
"c:\DotNetProjects\MyService\bin\MyS
ervice.exe"
Microsoft (R) .NET Framework Installation utility Version 1.1.4322.573
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.


Running a transacted installation.

Beginning the Install phase of the installation.
See the contents of the log file for the
c:\dotnetprojects\myservice\bin\myservi
ce.exe assembly's progress.
The file is located at c:\dotnetprojects\myservice\bin\myservice.InstallLog.
Installing assembly 'c:\dotnetprojects\myservice\bin\myservice.exe'.
Affected parameters are:
assemblypath = c:\dotnetprojects\myservice\bin\myservice.exe
logfile = c:\dotnetprojects\myservice\bin\myservice.InstallLog
Installing service Service1...
Creating EventLog source Service1 in log Application...

An exception occurred during the Install phase.
System.ComponentModel.Win32Exception: The account name is invalid or does
not ex
ist, or the password is invalid for the account name specified

The Rollback phase of the installation is beginning.
See the contents of the log file for the
c:\dotnetprojects\myservice\bin\myservi
ce.exe assembly's progress.
The file is located at c:\dotnetprojects\myservice\bin\myservice.InstallLog.
Rolling back assembly 'c:\dotnetprojects\myservice\bin\myservice.exe'.
Affected parameters are:
assemblypath = c:\dotnetprojects\myservice\bin\myservice.exe
logfile = c:\dotnetprojects\myservice\bin\myservice.InstallLog
Restoring event log to previous state for source Service1.

The Rollback phase completed successfully.

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

C:\DotNetProjects\MyService\bin>
***********************************************************

So I assume it is finding it fine.
 
T

tshad

I finally got it to work.

I changed the Account from LocalService (which was what my instructions said
to use) to LocalSystem. Now it installed.

Why wouldn't it install with the other account (LocalService)?

Thanks,

Tom
 
T

tshad

This is the .net framework group, isn't it?

"microsoft.public.dotnet.framework.aspnet" is where I posted it.

Tom
 
J

Juan T. Llibre

Hi, Tom.

re:
This is the .net framework group, isn't it?

Actually, no.

This is the ASP.NET newsgroup, but since your question is about
Windows Services (unless you intend to control them via a web app)
this is not the place where you can get the best help.

The .net framework group is microsoft.public.dotnet.framework

Again, you *might* get a good answer here, but you *probably*
will find a quicker/better response in a newsgroup more focused
towards the heart of your question.
 
T

tshad

Lucas Tam said:
You can...

For the username, did you try:

ComputerName\Username

or

Domain\Username

?

Where do I do that?

In VS, I just set it up to LocalService, build it and then from the console
I do "InstallUtil "...".

I never get a question about user name.

Should I be getting it?

Thanks,

Tom
 
T

tshad

Juan T. Llibre said:
Hi, Tom.

re:

Actually, no.

This is the ASP.NET newsgroup, but since your question is about
Windows Services (unless you intend to control them via a web app)
this is not the place where you can get the best help.

The .net framework group is microsoft.public.dotnet.framework

Ok,

I'll post it there.

These problems have been driving me nuts - hopefully someone there can help

Thanks,

Tom
 
L

Lucas Tam

Where do I do that?

In VS, I just set it up to LocalService, build it and then from the
console I do "InstallUtil "...".

I never get a question about user name.

Should I be getting it?

Yes... It asks me for a username when I run the InstallUtil:

installutil "C:\Service.exe"

During the install, it pops a message box asking for the username.
 
T

tshad

Lucas Tam said:
Yes... It asks me for a username when I run the InstallUtil:

installutil "C:\Service.exe"

During the install, it pops a message box asking for the username.

Doesn't do that for me.

Just gives a file does not exist or access denied message (which of it
shouldn't since, I never got a chance to enter the username)


Tom
 
L

Lucas Tam

Doesn't do that for me.

Just gives a file does not exist or access denied message (which of it
shouldn't since, I never got a chance to enter the username)

Oh the installutil.exe tool is in your .NET framework directory.

Try running it from:

C:\WINDOWS\Microsoft.NET\Framework\xxxxxxx <-- Version # here
 

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

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top