windows-services

How could I prevent a folder from being created using a windows service?

本小妞迷上赌 提交于 2019-11-29 15:53:28
I have users and processes on a web server. I'm looking to write a windows service that is capable of intercepting calls to create folders within a specific sub-directory. I've found several sources out there for reactively catching that a folder was created, but I want to create a windows service that will proactively intercept and pre-empt any unacceptable calls to create the folder. Let me pre-empty the "why"-ers. Don't bother asking why. Suffice it to say I've been asked to do this, and I'm trying to find the simplest method of accomplishing the task in an automated way. I've already

How to set up dependencies between windows-services on different servers in same domain

ぃ、小莉子 提交于 2019-11-29 15:38:32
I have a situation where a windows service on one server should not be started until a windows service on a different server has started. What I'd like to do is set the service dependencies but the standard "sc <service1> depend= service2" doesn't seem to cater for this. I could wrap the service code in a TryUntilSuccesful() sort of call but I would like to know if there is a recomended way to set up dependencies for windows services across servers in the same domain. Dependencies between Windows Services on the same machine are managed by the Service Control Manager (SCM). The SCM can't/won't

How do I install this service_wrapper for mongrel/rails on my windows server?

狂风中的少年 提交于 2019-11-29 15:34:28
问题 I have been given the unpleasant task of installing a Rails 3 app I have written on Windows Server 2008 (definitely not my choice - was promised a linux server but I.T. pulled the rug out at the last minute so please don't suggest a change in environment as a solution). I followed the instructions on this blog post (with a few minor modifications) and now actually have my app up and running under Windows/IIS (proxying mongrel) after a great deal of frustration. The only thing remaining is to

JavaExe and Java application as windows system service interactive to desktop

◇◆丶佛笑我妖孽 提交于 2019-11-29 15:32:00
Request: This is a very common problem faced by Java devs in my locale. I am really stuck for many days on this. Searched and tried a lot, read the docs. read ALL the stackoverflow questions related to JavaExe. Please only reply if you have done similar thing before and have a comprehensive answer. I would be really grateful to the community! Senario: I am using JavaExe to run an application as system service in desktop interactive capability. To be exact I have an application that captures screenshots of desktops . I want it to run ( as admin ) on any user login so no one can stop it. I have

Enable windows service programmatically

独自空忆成欢 提交于 2019-11-29 14:51:53
I am trying to enable a windows service programmatically by modifying the value in registry as below. The value does change. However, I am not able to start the service after that because windows still seeing it as disabled. public void EnabledTheService(string serviceName) { try { RegistryKey key = Registry.LocalMachine .OpenSubKey(@"SYSTEM\CurrentControlSet\Services\" + serviceName, true); key.SetValue("Start", 2); } catch (Exception ex) { Console.Write(ex.Message); } } public void StartService(string serviceName) { ServiceController service = new ServiceController(serviceName); try {

Starting remote Windows services with ServiceController and impersonation

谁说胖子不能爱 提交于 2019-11-29 14:42:40
I have a .NET MVC3 application that needs to be able to turn a remote service on and off. In order to do this I am impersonating a specific user account via WindowsIdentity.Impersonate(). To test the user's permissions I can log in as the user and execute sc.exe \\[server] start [service] from the command prompt. I also know that the impersonate command is working as expected because the application runs anonymously and therefore cannot control services on my local machine ( . ) without impersonation, but can control local services with impersonation. However, when I put it together and

error 1083 the executable program that this service is configured to run does not implemented the service

流过昼夜 提交于 2019-11-29 13:22:01
getting error while try to start service answer: if you are getting this error check the service name and service process installer service name. Both must be the same. happy coding Source: http://cut.lu/cddc2c Raj Bhide Also ensure that in the entry point for the exe (usually the Main procedure) an instance of the your service class (that derives from Service base is created).eg. private static void Main() { var servicesToRun = new ServiceBase[] { new MyService1(), new MyService2() }; ServiceBase.Run(servicesToRun); } If you do not do this, say you do not include code to create instance of

sc.exe config “Service Name” obj= “DOMAIN\User” password= “password” not working

偶尔善良 提交于 2019-11-29 13:07:33
问题 I want to set password for a service from the cmd. I got the option sc.exe config "Service Name" obj= "DOMAIN\User" password= "password" When I execute, its showing "[SC] ChangeServiceConfig SUCCESS" and if I start the service I am getting "Windows could not start the service1 service on Local Computer. Error 1069: The service did not start due to a logon failure." I searched and got the below link Using SC.exe to set service credentials password fails My password doesn't consist of special

Windows service OnStop wait for finished processing

怎甘沉沦 提交于 2019-11-29 12:31:57
问题 I actually develop a Windows service in VS 2012 / .NET 4.5. The service is following the scheme of the code snippet below: Using a timer Executes some desired operation every couple of minutes. The process takes about 10 minutes to complete I use a single thread in the service What I am worried about is that if somebody stops the service via the management console, it might be just during the process that the service is doing. I have done some reading about stopping Windows service with

Service failed to start error 1920

谁说胖子不能爱 提交于 2019-11-29 12:27:30
On some machine we have the following error at service install: "Service ... failed to start. Verify that you have sufficient privileges to start system services." Service is installed fine tho, just that it can't be started as Network Service from Services.msc. Service starts and runs good if started from console it's executable... Same thing happens with another service started as Local System. On other machines everything is fine. Service starts as network service with no problems. We think is a problem with windows rights, like error says, but how to check? And what to do? Thanks, Adrya