windows-services

Granting remote user (non admin) the ability to enumerate services in Win32_Service in namespace cimv2 using WMI & C#

这一生的挚爱 提交于 2019-11-28 01:30:39
问题 I'm creating a watch dog service that will be monitoring other services on various remote servers (all in the same domain). The user that I'm using to connect to the remote servers is not an admin. When I try to enumerate the services in the Win32_Service class, I get an access denied error. I've given the user 'Remote Enable' & 'Enable Account' persmissions to the Root\CIMV2 namespace in the WMI Control. I am able to connect to the server with the following code. The object ServiceListItem

Programmatically Install Windows Service On Remote Machine

拟墨画扇 提交于 2019-11-28 01:04:55
问题 Similar to https://stackoverflow.com/a/467565/774828 which shows how to start and stop an existing Windows service on a remote machine, I am trying to install a Windows Service on a remote machine. I can start and stop the services on the remote machine fine, but I can't find how to install a new service remotely, without resorting to calling the sc.exe process (https://stackoverflow.com/a/1159059/774828) which I want to avoid if possible. I know there is a System.Configuration.Install

launch process from Session 0 Isolation

老子叫甜甜 提交于 2019-11-28 00:54:55
问题 On Windows 8.1 I have a service that starts PowerShell scripts. The service runs as “nt authority\system” in Session 0 Isolation. Any process that I spawn from PowerShell runs as “nt authority\system” in Session 0 Isolation. I need to run a script that is under a user account out of session 0 and not the system account. I have tried this Start-Process "$PsHome\PowerShell.exe" -Credential $pp -ArgumentList $script -wait and PsExec specifying which session I want with "-I 1" argument. & PsExec

Why doesn't Windows Service work properly with System.Timers.Timer or System.Windows.Forms.Timer

可紊 提交于 2019-11-28 00:52:11
问题 I have been recently challenged with writing a Windows Service. I needed to periodically request a URL and check its availability. For this I decided to initialize a timer in OnStart method of the service and do all the work in timer_Tick event. My first approach was using System.Windows.Forms.Timer and its Tick event. I chose for it, because of the tutorial that I was reading. Somehow I could not make the service work. It installed and started without problems, but it would not fire the

Communicate with WCF Windows Service in VB6?

别等时光非礼了梦想. 提交于 2019-11-28 00:19:29
I have a VB6 application that I want to communicate with a WCF Windows Service that I have written which imports Security Certificates. The only function in the service takes two string arguments. I have been having a lot of difficulty getting the two programs to communicate however. In VB.NET, it is easy, just make a reference to the service as you would a web service. In VB6, however, it is not so simple it seems. Searching only seems to pull up examples of how to WRITE a Windows service in VB6. Anyone know how this is done? The easyest way I have found to access a WCF service from VB6 is to

Error 1053 the service did not respond to the start or control request

倖福魔咒の 提交于 2019-11-27 23:25:36
I've written a Windows Service in C# that basically checks my db every minute for orders, generates a PDF from these orders, and emails it. The logic works perfectly in my tests etc.. When i create the service, and install it using the setup project, when I go to start the service in the services mmc, I get: error 1053 the service did not respond to the start or control request in a timely fashion My OnStart method looks like this: protected override void OnStart(string[] args) { //writeToWindowsEventLog("Service started", EventLogEntryType.Information); timer.Enabled = true; } Basically, just

Querying Windows file indexing service using C#

放肆的年华 提交于 2019-11-27 23:21:50
Is it possible to query file indexing service using C#? Does file indexing service expose a database? If so what is the scheme of this database? The thing is now called 'Windows Search' . Current version is 4.0. A special SDK exists and documentation is readily available in MSDN So the answer is positive: yes, it it possible. Here's the page with more info. 来源: https://stackoverflow.com/questions/4131420/querying-windows-file-indexing-service-using-c-sharp

WCF NamedPipe CommunicationException - “The pipe has been ended. (109, 0x6d).”

谁说我不能喝 提交于 2019-11-27 23:20:09
问题 I am writing a Windows Service with accompanying "status tool." The service hosts a WCF named pipe endpoint for inter-process communication. Through the named pipe, the status tool can periodically query the service for the latest "status." On my development machine, I have multiple IP Addresses; one of them is a "local" network with a 192.168.1.XX address. The other is the "corporate" network, with a 10.0.X.XX address. The Windows Service collects UDP multicast traffic on a single IP Address

Is it possible to create a standalone, C# web service deployed as an EXE or Windows service?

吃可爱长大的小学妹 提交于 2019-11-27 23:07:50
问题 Is it possible to create a C# EXE or Windows Service that can process Web Service requests? Obviously, some sort of embedded, probably limited, web server would have to be part of the EXE/service. The EXE/service would not have to rely on IIS being installed. Preferably, the embedded web service could handle HTTPS/SSL type connections. The scenario is this: customer wants to install a small agent (a windows service) on their corporate machines. The agent would have two primary tasks: 1)

Is it possible to install multiple instances of the same delphi service application?

最后都变了- 提交于 2019-11-27 23:06:12
I have a service application built in Delphi that works great. It does exactly what I want it to do and all is happy. All is fine until I want to run two (or more) instances of that service on a single machine. Since the service name is hard coded into the program (via the Name property of the service), I can only install the service once on any given computer. If I try to modify the Name property at run-time, the service does not respond unless the Name property is set to the same thing that was set during design time. I have done a workaround for this where I have all of the code that is not