Installing a .NET Windows Service using InstallUtil

Discussion in 'Microsoft Dot NET' started by Randy, Mar 12, 2004.

  1. Randy

    Randy Guest

    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 :)
     
    Randy, Mar 12, 2004
    #1
    1. Advertisements

  2. Randy

    JH Guest

    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" <> wrote in message
    news:ui9T%...
    > 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 :)
    >
    >
     
    JH, Mar 12, 2004
    #2
    1. Advertisements

  3. 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" <> wrote in message
    news:ui9T#...
    > 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 :)
    >
    >
     
    Brandon Potter, Mar 12, 2004
    #3
  4. Randy

    Randy Guest

    Thanks for the info...I'll give that a shot. :)


    "JH" <> wrote in message
    news:wTq4c.2402$...
    > 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" <> wrote in message
    > news:ui9T%...
    > > 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 :)
    > >
    > >

    >
    >
     
    Randy, Mar 13, 2004
    #4
  5. Randy

    Randy Guest

    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" <> wrote in message
    news:Ob%...
    > 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" <> wrote in message
    > news:ui9T#...
    > > 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 :)
    > >
    > >

    >
    >
     
    Randy, Mar 13, 2004
    #5
  6. 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" <> wrote in message
    news:...
    > 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" <> wrote in message
    > news:Ob%...
    > > 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" <> wrote in message
    > > news:ui9T#...
    > > > 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 :)
    > > >
    > > >

    > >
    > >

    >
    >
     
    Brandon Potter, Mar 13, 2004
    #6
  7. Randy

    RichTeel

    Joined:
    Jul 10, 2009
    Messages:
    1
    Likes Received:
    0
    I found a great article at http://www.codeproject.com/KB/system/WindowsService.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.
     
    RichTeel, Jul 10, 2009
    #7
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Daniel Reber

    URGENT installutil.exe is missing

    Daniel Reber, Aug 5, 2003, in forum: Microsoft Dot NET
    Replies:
    2
    Views:
    603
    John Timney \(Microsoft MVP\)
    Aug 5, 2003
  2. Mike John

    How to use the installutil to install a service

    Mike John, Dec 2, 2003, in forum: Microsoft Dot NET
    Replies:
    1
    Views:
    366
    John Timney \(Microsoft MVP\)
    Dec 2, 2003
  3. Owe Armandt

    Using InstallUtil to install service...

    Owe Armandt, Dec 6, 2004, in forum: Microsoft Dot NET
    Replies:
    0
    Views:
    206
    Owe Armandt
    Dec 6, 2004
  4. Guest
    Replies:
    1
    Views:
    344
    Guest
    Aug 9, 2005
  5. James

    Install Window Service without InstallUtil.exe

    James, Mar 11, 2006, in forum: Microsoft Dot NET
    Replies:
    1
    Views:
    550
    Michael Nemtsev
    Mar 11, 2006
Loading...

Share This Page