Search code examples
c#.netwcfwindows-installer

I am not able to create msi setup using installshield for self hosted console application


enter image description hereI have created self-hosted WCF service using Console application. I have created msi using Installshield but when I am installing setup it will stuck and after some time failed to setup.

I have added log in code and found that on the line of hosting WCF service it was going to stuck and throw an error.

Any Idea how can I resolve this issue?


Solution

  • Service Install: Can you install and run it manually? You must install with admin rights, if you specify a user account to run the service it must have the "log on as a service" privilege (check by running secpol.msc or see here), the file you install must actually be a proper service - obviously - I sometimes mix up my test executables with the service binary. Ever forget? Happens to me :-).

    Logging: Get yourself a proper log file first of all:

    msiexec.exe /i "Setup.msi" /L*V "C:\Setup.log"
    

    Or in silent mode:

    msiexec.exe /i "Setup.msi" /QN /L*V "C:\Setup.log"
    

    Some more information on Logging:


    Credentials: Just adding that there are several built-in accounts you can use to run the service: