PC Review


Reply
Thread Tools Rate Thread

Installing a .NET Windows Service using InstallUtil

 
 
Randy
Guest
Posts: n/a
 
      12th Mar 2004
Hello,
I created a Windows Service (c#) and finally deciphered how to add an
Installer to the project. I got all this to work. On my machine I can
install/remove the service by using...
InstallUtil JTEService.exe
and InstallUtil /u JTEService.exe

I tried to install it on another machine with .NET Framework on this other
machine and it won't install. In the install log file it says...

No public installers with the RunInstallerAttribute.Yes attribute could be
found

Does anyone know what I must do at this point to install the service on this
other machine? I thought if the framework was on it all I'd have to do is
use InstallUtil...

Thanks

Cheers


 
Reply With Quote
 
 
 
 
JH
Guest
Posts: n/a
 
      12th Mar 2004
I had that problem also, in my case the problem was that the path
environment variable was still pointing to an older version of the
framework, v1.0.3705, I had to manually set it to
\WINNT\Microsoft.NET\Framework\v1.1.4322\, and then I had no problem
installing the service. Now I have another problem, the service will no
longer start, it was working just fine before, but I'll just start another
thread about that .

"Randy" <(E-Mail Removed)> wrote in message
news:ui9T%(E-Mail Removed)...
> Hello,
> I created a Windows Service (c#) and finally deciphered how to add an
> Installer to the project. I got all this to work. On my machine I can
> install/remove the service by using...
> InstallUtil JTEService.exe
> and InstallUtil /u JTEService.exe
>
> I tried to install it on another machine with .NET Framework on this other
> machine and it won't install. In the install log file it says...
>
> No public installers with the RunInstallerAttribute.Yes attribute could be
> found
>
> Does anyone know what I must do at this point to install the service on

this
> other machine? I thought if the framework was on it all I'd have to do is
> use InstallUtil...
>
> Thanks
>
> Cheers
>
>



 
Reply With Quote
 
 
 
 
Brandon Potter
Guest
Posts: n/a
 
      13th Mar 2004
Randy,

A better solution than using the installutil tool on a client installation
might be to implement a ServiceInstaller into your service and add a custom
action to your deployment project under the Install node. Create an action
that points to your service project and set the Arguments property to
/install

Same deal for /uninstall.

Brandon

"Randy" <(E-Mail Removed)> wrote in message
news:ui9T#(E-Mail Removed)...
> Hello,
> I created a Windows Service (c#) and finally deciphered how to add an
> Installer to the project. I got all this to work. On my machine I can
> install/remove the service by using...
> InstallUtil JTEService.exe
> and InstallUtil /u JTEService.exe
>
> I tried to install it on another machine with .NET Framework on this other
> machine and it won't install. In the install log file it says...
>
> No public installers with the RunInstallerAttribute.Yes attribute could be
> found
>
> Does anyone know what I must do at this point to install the service on

this
> other machine? I thought if the framework was on it all I'd have to do is
> use InstallUtil...
>
> Thanks
>
> Cheers
>
>



 
Reply With Quote
 
Randy
Guest
Posts: n/a
 
      13th Mar 2004
Thanks for the info...I'll give that a shot.


"JH" <(E-Mail Removed)> wrote in message
news:wTq4c.2402$(E-Mail Removed)...
> I had that problem also, in my case the problem was that the path
> environment variable was still pointing to an older version of the
> framework, v1.0.3705, I had to manually set it to
> \WINNT\Microsoft.NET\Framework\v1.1.4322\, and then I had no problem
> installing the service. Now I have another problem, the service will no
> longer start, it was working just fine before, but I'll just start another
> thread about that .
>
> "Randy" <(E-Mail Removed)> wrote in message
> news:ui9T%(E-Mail Removed)...
> > Hello,
> > I created a Windows Service (c#) and finally deciphered how to add an
> > Installer to the project. I got all this to work. On my machine I can
> > install/remove the service by using...
> > InstallUtil JTEService.exe
> > and InstallUtil /u JTEService.exe
> >
> > I tried to install it on another machine with .NET Framework on this

other
> > machine and it won't install. In the install log file it says...
> >
> > No public installers with the RunInstallerAttribute.Yes attribute could

be
> > found
> >
> > Does anyone know what I must do at this point to install the service on

> this
> > other machine? I thought if the framework was on it all I'd have to do

is
> > use InstallUtil...
> >
> > Thanks
> >
> > Cheers
> >
> >

>
>



 
Reply With Quote
 
Randy
Guest
Posts: n/a
 
      13th Mar 2004
Thanks for the info Brandon. This sounds interesting, do you know of a web
site or where I might find more info on this?

"Brandon Potter" <(E-Mail Removed)> wrote in message
news:Ob%(E-Mail Removed)...
> Randy,
>
> A better solution than using the installutil tool on a client installation
> might be to implement a ServiceInstaller into your service and add a

custom
> action to your deployment project under the Install node. Create an action
> that points to your service project and set the Arguments property to
> /install
>
> Same deal for /uninstall.
>
> Brandon
>
> "Randy" <(E-Mail Removed)> wrote in message
> news:ui9T#(E-Mail Removed)...
> > Hello,
> > I created a Windows Service (c#) and finally deciphered how to add an
> > Installer to the project. I got all this to work. On my machine I can
> > install/remove the service by using...
> > InstallUtil JTEService.exe
> > and InstallUtil /u JTEService.exe
> >
> > I tried to install it on another machine with .NET Framework on this

other
> > machine and it won't install. In the install log file it says...
> >
> > No public installers with the RunInstallerAttribute.Yes attribute could

be
> > found
> >
> > Does anyone know what I must do at this point to install the service on

> this
> > other machine? I thought if the framework was on it all I'd have to do

is
> > use InstallUtil...
> >
> > Thanks
> >
> > Cheers
> >
> >

>
>



 
Reply With Quote
 
Brandon Potter
Guest
Posts: n/a
 
      13th Mar 2004
Randy,

Actually, no. I stumbled upon this method on one of the comments on the
bottom of an article that was using the Installutil method.

Let me know if you want me to provide more info; I've been using it this way
ever since!

Brandon

"Randy" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Thanks for the info Brandon. This sounds interesting, do you know of a web
> site or where I might find more info on this?
>
> "Brandon Potter" <(E-Mail Removed)> wrote in message
> news:Ob%(E-Mail Removed)...
> > Randy,
> >
> > A better solution than using the installutil tool on a client

installation
> > might be to implement a ServiceInstaller into your service and add a

> custom
> > action to your deployment project under the Install node. Create an

action
> > that points to your service project and set the Arguments property to
> > /install
> >
> > Same deal for /uninstall.
> >
> > Brandon
> >
> > "Randy" <(E-Mail Removed)> wrote in message
> > news:ui9T#(E-Mail Removed)...
> > > Hello,
> > > I created a Windows Service (c#) and finally deciphered how to add an
> > > Installer to the project. I got all this to work. On my machine I can
> > > install/remove the service by using...
> > > InstallUtil JTEService.exe
> > > and InstallUtil /u JTEService.exe
> > >
> > > I tried to install it on another machine with .NET Framework on this

> other
> > > machine and it won't install. In the install log file it says...
> > >
> > > No public installers with the RunInstallerAttribute.Yes attribute

could
> be
> > > found
> > >
> > > Does anyone know what I must do at this point to install the service

on
> > this
> > > other machine? I thought if the framework was on it all I'd have to do

> is
> > > use InstallUtil...
> > >
> > > Thanks
> > >
> > > Cheers
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
New Member
Join Date: Jul 2009
Posts: 1
 
      10th Jul 2009
I found a great article at http://www.codeproject.com/KB/system...wsService.aspx which helped me resolve this issue.

I am using VS 2008

In the project, add a reference to System.Configuration.Install.

Add the WindowsServiceInstaller.cs class from the article.

Modifiy the WindowsServiceInstaller class properties such as Account, Username, Password, DisplayName, StartType, ServiceName if necessary.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error installing Service using installutil on .NET 2.0 eoinmoon@gmail.com Microsoft C# .NET 1 15th May 2007 12:51 PM
what exact registry entries does the installing of a .net windows service create? either with installutil or with a deployment project. Daniel Microsoft Dot NET 1 23rd Aug 2005 09:11 AM
what exact registry entries does the installing of a .net windows service create? either with installutil or with a deployment project. Daniel Microsoft Dot NET Framework 1 21st Aug 2005 04:36 PM
what exact registry entries does the installing of a .net windows service create? either with installutil or with a deployment project. Daniel Microsoft C# .NET 1 20th Aug 2005 06:08 AM
Installing a .NET Windows Service using InstallUtil Randy Microsoft C# .NET 2 13th Mar 2004 05:07 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:39 AM.