I just installed a windows service using VS 2010, using the installutil.exe, the cmd prompt window said the commit phase completed successfully, but I cannot see the windows service in the local services folder.
What did I miss here?
I am using Windows 7 and VS 2010
UPDATE:
I un-installed the service (which was named service1) changed the name to something that made sense, installed the service (same process as above), still cannot find it in the services browser.
FWIW... I renamed my service1.cs in the properties window (filename value).. but it was still showing service1 in the services browser. I ended up changing the values in the code behind as well (auto generated code) this.serviceInstaller1.ServiceName = "service1";
Update (2) I created a dummy windows service, and was able to successfully install that (it prompted me for Domain Login ID & password) and I was able to see it in the services browser.
However, I am not able to see the actual windows service (related to my project) in the services browser. Obviously I have permissions, since I was able to install the dummy service.
According this this site Can't see windows service after installation
I cannot see the service in the registry in "HKLM\System\CurrentControlSet\Services" path.
Update (3)
The log file says
No public installers with the RunInstallerAttribute.Yes attribute could be found in the C:..
however, I do have a ProjectInstaller.cs file in the project solution.
I added
[RunInstaller(true)]
to the ProjectInstaller.cs file, still no luck
Any suggesstions?
Also remember to check what name you've given your service before you look for it in the list. I copy-pasted some code from the net and forgot to change the name of the service in the code so of course I couldn't find it...
serviceInstaller.DisplayName = "Example service"
Doh!
Check if you have something like this in the constructor of the Installer derivated class with the [RunInstaller(true)] attribute:
public ServiceSetup()
{
Installers.Clear();
ServiceInstaller serviceInstaller = new ServiceInstaller();
// serviceInstaller.Description = // FIXME:
// serviceInstaller.ServiceName = // FIXME:
// serviceInstaller.DisplayName = // FIXME:
serviceInstaller.StartType = ServiceStartMode.Automatic;
Installers.Add(serviceInstaller);
ServiceProcessInstaller serviceProcessInstaller = new ServiceProcessInstaller();
serviceProcessInstaller.Account = ServiceAccount.LocalSystem;
serviceProcessInstaller.Username = null;
serviceProcessInstaller.Password = null;
Installers.Add(serviceProcessInstaller);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With