installutil

Problem installing windows service

有些话、适合烂在心里 提交于 2019-12-05 06:41:47
I am having a problem installing a Windows service. I installed and uninstalled the service numerous times (installutil..... installutil /u) without any problem but something went wrong and now when I attempt to install, I get the error message listed below. I checked the computer management console, and service CIMediator does not appear on the list of services. How do I remove the service? System.ArgumentException: Source CIMediator already exists on the local computer. Just solved the same problem, also after a numerous uninstalls/installs/restarts. I have my own implementation of service

TCP IP Listener in windows Service

三世轮回 提交于 2019-12-04 15:49:44
问题 I'm trying to create a windows service that needs to run in the background and listen for incoming traffic (a normal and regular TCP listener) my code is: private TcpListener server; public void startServer() { // EventLog.WriteEntry(source, "connected on: " + ipAddress.ToString() + " port: " + Service1.Port.ToString()); server = new TcpListener(IPAddress.Parse("127.0.0.1"), Service1.Port); server.Start(); while (true) { var client = server.AcceptTcpClient(); new Thread(work).Start(client); }

TCP IP Listener in windows Service

房东的猫 提交于 2019-12-03 08:57:44
I'm trying to create a windows service that needs to run in the background and listen for incoming traffic (a normal and regular TCP listener) my code is: private TcpListener server; public void startServer() { // EventLog.WriteEntry(source, "connected on: " + ipAddress.ToString() + " port: " + Service1.Port.ToString()); server = new TcpListener(IPAddress.Parse("127.0.0.1"), Service1.Port); server.Start(); while (true) { var client = server.AcceptTcpClient(); new Thread(work).Start(client); } public void work(object client) { string msg = null; var clientLocal = (TcpClient)client; using

Using InstallUtil to install a Windows service with startup parameters

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-30 06:38:13
问题 I am using InstallUtil to install my service and I just cannot figure out how to specify the startup parameters for it! Here is my Installer subclass: [RunInstaller(true)] public class ServerHostInstaller : Installer { private ServiceInstaller m_serviceInstaller; private ServiceProcessInstaller m_serviceProcessInstaller; private static string s_usage = "Usage:\ninstallutil /i /username=<user_name> /password=<user_password> NCStub.Server.Host.exe"; public ServerHostInstaller() { m

.net InstallUtil utility - 32 bit vs 64 bit

女生的网名这么多〃 提交于 2019-11-29 06:21:52
问题 I've got a windows service compiled as AnyCPU. I'm trying to get it into our installer to distribute. However... I am unclear on the difference between the 32 bit and 64 bit versions of InstallUtil. Does anyone know what (if any) there are? On my 64 bit machine, I can run either the $(WinDir)\Microsoft.NET\Framework64\v2.0.50727 or the $(WinDir)\Microsoft.NET\Framework\v2.0.50727. In both cases, the resulting service Process in Task Manager does not have the *32 flag applied to it. Only the

Using InstallUtil to install a Windows service with startup parameters

╄→尐↘猪︶ㄣ 提交于 2019-11-28 20:46:31
I am using InstallUtil to install my service and I just cannot figure out how to specify the startup parameters for it! Here is my Installer subclass: [RunInstaller(true)] public class ServerHostInstaller : Installer { private ServiceInstaller m_serviceInstaller; private ServiceProcessInstaller m_serviceProcessInstaller; private static string s_usage = "Usage:\ninstallutil /i /username=<user_name> /password=<user_password> NCStub.Server.Host.exe"; public ServerHostInstaller() { m_serviceInstaller = new ServiceInstaller(); m_serviceInstaller.ServiceName = Program.ServiceName; m_serviceInstaller

installing windows service with SC.exe or InstallUtil.exe - there is difference but which?

♀尐吖头ヾ 提交于 2019-11-28 17:25:51
SC.exe and InstallUtil both install/uninstall windows services. But they don't seem to work the same way. What is the difference? For instance InstallUtil fails (some file or dependency not found error) while Sc create happily installs the service. Too add to the strangeness; the service doesn't show up if I run net start in the console. But it does show up in the services GUI. Variants of this happen when I try to uninstall. I have written the service myself and earlier versions work. Dotnet3.5. Yes, installing a service isn't particularly complicated. It just takes writing a handful of

Installing multiple instances of the same windows service on a server

别来无恙 提交于 2019-11-28 15:14:25
So we've produced a windows service to feed data to our client application and everything is going great. The client has come up with a fun configuration request that requires two instances of this service running on the same server and configured to point at separate databases. So far I haven't been able to get this to happen and was hoping my fellow stackoverflow members might be able to give some hints as to why. Current setup: I've set up the project that contains the windows service, we'll call it AppService from now on, and the ProjectInstaller.cs file that handles custom installation

Install Windows Service created in Visual Studio

心已入冬 提交于 2019-11-27 10:24:28
When I create a new Windows Service in Visual Studio 2010, I get the message stating to use InstallUtil and net start to run the service. I have tried the following steps: Create new project File -> New -> Project -> Windows Service Project Name: TestService Build project as is (Service1 constructor, OnStart, OnStop) Open command prompt, run "C:\Windows\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe" TestService.exe Run net start TestService . Output of step 4 Running a transacted installation. Beginning the Install phase of the installation. See the contents of the log file for the C:

Installing multiple instances of the same windows service on a server

醉酒当歌 提交于 2019-11-27 09:04:53
问题 So we've produced a windows service to feed data to our client application and everything is going great. The client has come up with a fun configuration request that requires two instances of this service running on the same server and configured to point at separate databases. So far I haven't been able to get this to happen and was hoping my fellow stackoverflow members might be able to give some hints as to why. Current setup: I've set up the project that contains the windows service, we