none
How to Install a Windows Service using the Setup Project? RRS feed

  • Question

  • I have a windows service and created a setup project for it.

    When the msi package runs, it installs the application but doesn't register the windows service in the services.svc.

    I tried InstallUtil and it works though.

    How can I fix my setup project so that it installs my windows service as well?

    Thanks

    Monday, May 24, 2010 4:30 PM

Answers

All replies

  • http://msdn.microsoft.com/en-us/library/zt39148a(VS.80).aspx 

    You may have forgotten to add the service as a custom actionm at the top Custom action node.


    Phil Wilson
    • Marked as answer by Dynamic Tuesday, May 25, 2010 8:24 AM
    • Unmarked as answer by Dynamic Tuesday, May 25, 2010 9:15 AM
    • Marked as answer by YiChun Chen Wednesday, May 26, 2010 11:07 AM
    Monday, May 24, 2010 5:49 PM
  • That's right, thanks Phil.

    I figured it out last night.

    Tuesday, May 25, 2010 8:24 AM
  • When installing the package, it asks username and password in a window. When I enter it, it gives me the following error:

    Error 1001: Value cannot be null.

    Parameter name: path1

    Any idea how to fix this and why this happens? I think it should be something related to the custom actions...

    Thanks,

    • Edited by Dynamic Tuesday, May 25, 2010 10:05 AM more info
    Tuesday, May 25, 2010 8:39 AM
  • More details about the error from my Event Log:

     

     

    "The description for Event ID 11001 from source MsiInstaller cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

    If the event originated on another computer, the display information had to be saved with the event.

    The following information was included with the event: 

    Product: [Service Name] -- Error 1001. Error 1001. Value cannot be null.

    Parameter name: path1

    (NULL)

    (NULL)

    (NULL)

    (NULL)

    the message resource is present but the message is not found in the string/message table"

     

    Tuesday, May 25, 2010 9:33 AM
  • I used IntallUtil to install it but the same error so the exception couldn't be because of the Custom Actions in the Setup project.

    There is something wrong with my service that I don't know what it is :( we recently migrated to vs2010...

    Tuesday, May 25, 2010 12:32 PM
  • Hi Dynamic,

    what type of service do you want install? What does this service do?

    Where did you use 'path1' in your service?

    Do you have administrative rights on your computer where you install?

    Regards

    martinwy

    Tuesday, May 25, 2010 4:34 PM
  • It's asking for the account because your ServiceProcessInstaller.Account is User, but you didn't give it an account.

    Don't pass any of your own values into CustomActionData - that might be causing the error.


    Phil Wilson
    • Marked as answer by YiChun Chen Wednesday, May 26, 2010 11:07 AM
    Tuesday, May 25, 2010 8:01 PM