windows-services

“A timeout was reached while waiting for the service to connect” error after rebooting

☆樱花仙子☆ 提交于 2019-12-29 12:11:32
问题 I have a custom-written Windows service that I run on a number of Hyper-V VMs. The VMs get rebooted a couple times an hour as part of some automated tests being run. The service is set to automatic start and almost all of the time, it starts up fine. However, maybe 5% of the time, with no pattern that I can discern, the service fails to start. When it fails, I get an error in Event Viewer saying A timeout was reached (30000 milliseconds) while waiting for the My Service Name service to

Why is SysWOW64 reported as System32?

僤鯓⒐⒋嵵緔 提交于 2019-12-29 09:34:04
问题 I am testing a Windows service. The service code fails when it tries to delete a read only file I created in %windir%\SysWOW64 , but the exception that is logged is: Access to the path 'C:\Windows\system32\CanvasImages\62230.jpg' is denied. I know 64 bit Windows has a whole lot of tricks up its sleeve concerning these two folders, and understand a little of it, but some accurate exception info would be nice. 回答1: It's a bit confusing, but SysWOW64 is actually the 32 bit emulator for 64 bit

Update app.config from WIX setup?

自作多情 提交于 2019-12-29 07:50:33
问题 I am trying Wix 3.6 and this is how it looks right now : <?xml version="1.0" encoding="UTF-8"?> <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="myappINSTALLDIR" Name="myapp5Service"> <Component Id="SampleServiceComponent" DiskId="1" Guid="6f51c0f3-776c-4aec-a200-1f199352c6c3" Win64="yes"> <File Id="myapp5.WindowsService.exe" Name="myapp5.WindowsService.exe" Source="$(var.myapp.WindowsService.TargetDir)\myapp5.WindowsService.exe" KeyPath='yes'/> ... <ServiceInstall Id=

How to run c# application with admin creds?

你说的曾经没有我的故事 提交于 2019-12-29 07:42:32
问题 I wrote a C# application that unlocks users when they are locked out of their account (Active Directory). The application searches for users in a specific OU and will list the locked out users in a ComboBox. Then you select that user from the ComboBox and choose unlock. If you are logged in as an admin, it works perfect. If you are a normal user no. I want to run my application with admin creds but under a normal user also as secure as possible. I was reading that maybe program a windows

windows service - config file

泄露秘密 提交于 2019-12-29 06:20:31
问题 I know this has probably been asked before but I can't seem to find the right answer for me. I have a windows service named foobar.exe . I have an application configuration file named foobar.exe.config in the same folder. Is the config file only read at startup? I would like to make changes to the config file without having to restart the service but that is the only way I can get the new settings read. What am I doing wrong? Can a windows service have a dynamic config file? 回答1: .NET

windows service - config file

前提是你 提交于 2019-12-29 06:20:28
问题 I know this has probably been asked before but I can't seem to find the right answer for me. I have a windows service named foobar.exe . I have an application configuration file named foobar.exe.config in the same folder. Is the config file only read at startup? I would like to make changes to the config file without having to restart the service but that is the only way I can get the new settings read. What am I doing wrong? Can a windows service have a dynamic config file? 回答1: .NET

How can I use CommandLine Arguments that is not recognized by TopShelf?

≯℡__Kan透↙ 提交于 2019-12-29 05:46:18
问题 I want to pass some custom arguments to the console app when I install and start it as a Windows Service via TopShelf. When I use: MyService install start /fooBar: Test Console application fails: [Failure] Command Line An unknown command-line option was found: DEFINE: fooBar = Test Question: How can I make my arguments to be recognizable by TopShelf so that I can consume their values? 回答1: EDIT: This only works when running the .exe, not when running as a service. As an alternative you could

Best Method to run a Java Application as a *nix Daemon or Windows Service?

限于喜欢 提交于 2019-12-29 05:04:26
问题 I am looking for the best method to run a Java Application as a *NIX daemon or a Windows Service. I've looked in to the Java Service Wrapper, the Apache Commons project 'jsvc', and the Apache Commons project 'procrun'. So far, the Java Service Wrapper looks like it's the best option... but, I'm wondering if there are any other "Open Source friendly" licensed products out there. 回答1: I've had great success with Java Service Wrapper myself. I haven't looked at the others, but the major

Best Method to run a Java Application as a *nix Daemon or Windows Service?

眉间皱痕 提交于 2019-12-29 05:04:25
问题 I am looking for the best method to run a Java Application as a *NIX daemon or a Windows Service. I've looked in to the Java Service Wrapper, the Apache Commons project 'jsvc', and the Apache Commons project 'procrun'. So far, the Java Service Wrapper looks like it's the best option... but, I'm wondering if there are any other "Open Source friendly" licensed products out there. 回答1: I've had great success with Java Service Wrapper myself. I haven't looked at the others, but the major

Restarting windows service during WIX upgrade

六月ゝ 毕业季﹏ 提交于 2019-12-29 02:09:22
问题 We have a windows service installed as a part of our msi WIX installer . During upgrade we are trying to just restart service instead of doing complete reinstall to safe guard the service user creds. A lot of posts discussed in this regard but nothing is conclusive. Tried out disabling DeleteServices during upgrade by doing below, <InstallExecuteSequence> <DeleteServices>NOT UPGRADINGPRODUCTCODE</DeleteServices> </InstallExecuteSequence> Note: The above code is in old MSI as well But still