windows-services

MongoDB 3.0 Windows Service Start : System Error 2 has occured

£可爱£侵袭症+ 提交于 2020-01-01 03:02:42
问题 I have downloaded the MongoDB Windows msi install and run this successfully. The mongod.exe and mongo.exe command file executions work properly. The installation manual shows how to create the configuration file, and then to create the Windows Server using the command sc.exe create MongoDB binPath= "\"C:\mongodb\mongod.exe\" --service --config=\"C:\mongodb\mongod.cfg\"" This creates a SUCCESS response. The service is then started net start MongoDB but this produces the response System Error 2

Simple and flexible method to run java as a windows service

走远了吗. 提交于 2019-12-31 22:27:44
问题 I read SO q&a about launch java as windows service wrappers, but can't find/choose product, suitable for my requirements : Wrapper reads all java launch parameters from config file. In registry must be only commands to run wrapper itself - path to exe and maybe path to config. Always grant admin rights to change app parameters in registry is not comfortable. Working dir and path to application also must be in config. I want to place all wrapper files deep into program, because user not

Installing/Uninstalling Services in Windows 7: “Error 1001. The specified service has been marked for deletion”

此生再无相见时 提交于 2019-12-31 11:44:53
问题 I am currently developing a Windows Service in .NET 4.0, Visual Studio 2010, Windows 7-32bit. I have an installer project that does the installation for me. When I install the service, uninstall it, and try to install again, I get the following error: Error 1001. The specified service has been marked for deletion In Windows XP, the problem was that the Services.msc was open. Closing this window would fix this problem. However, with Windows 7, the only way I can fix this is to restart. I tried

Installing/Uninstalling Services in Windows 7: “Error 1001. The specified service has been marked for deletion”

北城余情 提交于 2019-12-31 11:43:08
问题 I am currently developing a Windows Service in .NET 4.0, Visual Studio 2010, Windows 7-32bit. I have an installer project that does the installation for me. When I install the service, uninstall it, and try to install again, I get the following error: Error 1001. The specified service has been marked for deletion In Windows XP, the problem was that the Services.msc was open. Closing this window would fix this problem. However, with Windows 7, the only way I can fix this is to restart. I tried

how to have a function run inside a service every 10 minutes?

一曲冷凌霜 提交于 2019-12-31 09:05:17
问题 I have a windows service running, inside this i want to run a function every then minutes. I have found some code but it doesn't seem to work? I have a logger and it does not seem to go into the timer_Elapsed function ever? protected override void OnStart(string[] args) { // SmartImportService.WebService.WebServiceSoapClient test = new WebService.WebServiceSoapClient(); // test.Import(); log.Info("Info - Service Started"); _timer = new Timer(10 * 60 * 1000); // every 10 minutes?? _timer

What's the best way to implement a scheduled job using a windows service

限于喜欢 提交于 2019-12-31 03:25:07
问题 I have a database job that runs occasionally at night and I need a windows service to poll the database regularly to do some more work after the SQL job is done. I am a looking for a solid example to write a scheduler that can fail gracefully without crashing the service. 回答1: Take a look at http://codeplex.com/TaskService 回答2: Just make it a scheduled task. See windows service vs scheduled task 回答3: I would use MSMQ, add a final step to the job that adds a message to the queue (Via ActiveX

Powershell - Start Windows service with a parameter

梦想与她 提交于 2019-12-31 02:27:27
问题 I need to start a windows service via Powershell with a '1' as a parameter, like below: So basically I want to do something like this with powershell: Start-Service _MyService 1 <- won't work Googling has produced nothing of note on this, perhaps I'm looking for the wrong thing, but I can't believe it's not possible. Clues anyone? 回答1: An alternative is to use the Get-Service cmdlet to obtain a service controller, and then invoke its Start() method. # "ServiceName" != "Display Name"

Opening IE through WCF

ε祈祈猫儿з 提交于 2019-12-31 01:49:09
问题 I have a WCF service hosted in a Windows service. This service the WCF have one metohd and in this method I have one important line : Process Browser = Process.Start("iexplore.exe", hostUrl); I install Windows service as local system, but when I'm trying to invoke that method, everything seems to execute, except that one important line... and IE didn't open. I would like to add that the method itself is not in the service itself but in one of the service dll reference Any idea why? 回答1: Since

C# Windows Service Creates Process but doesn't executes it

谁说胖子不能爱 提交于 2019-12-30 12:04:01
问题 So I have checked many many sites, researched for days now. And I have not found or come up with one of my own solution for this problem. I know, apparently since Windows Vista, a Windows Service since its created in Session 0 its not able to interact with whats considered GUI executables like console apps and other softwares that are part of other Sessions that are not Session 0. According to Microsoft, a Service that does this would be a potential 'Virus'. Which I understand the reasoning

C# Windows Service Creates Process but doesn't executes it

∥☆過路亽.° 提交于 2019-12-30 12:03:46
问题 So I have checked many many sites, researched for days now. And I have not found or come up with one of my own solution for this problem. I know, apparently since Windows Vista, a Windows Service since its created in Session 0 its not able to interact with whats considered GUI executables like console apps and other softwares that are part of other Sessions that are not Session 0. According to Microsoft, a Service that does this would be a potential 'Virus'. Which I understand the reasoning