windows-services

Windows Service with NLog

耗尽温柔 提交于 2019-12-03 20:38:40
I am creating a Windows Service which I want to use NLog with. I want the logs to be written to the install location of the service say something like: PathToInstalledService\Logs\MyLog.txt This is of course going to require administrator priveledges. So my question is, when creating the install for the Service, what account should I use on the ServiceProcessInstaller. I have been currently using LocalService, but this account does not have the required elevation. Thanks. During installation you should change the permissions of the 'Logs' directory to allow your service account to write files.

Best use of Windows Service for repeating a program call

扶醉桌前 提交于 2019-12-03 20:33:05
Im building my first Windows Service. It's a component that connects to a mailbox and downloads all mails and store them on my local drive. My questions are these. What is the best way to repeat a program call in c# windows service. Im thinking of using a simple timer? Where do I start and stop the timer? is it in the service itself or the program my service is running? What code should be included in a Windows Service for the following function protected override void OnStart(string[] args) { //timer? // MyProgram mp = new MyProgram(); } Should I simply start my application with a new

How to install a windows service from command line specifying name and description?

巧了我就是萌 提交于 2019-12-03 19:52:05
问题 I created a Windows service with Delphi for a client server application. To install it I use c:\Test\MyService.exe /install (or /uninstall) This installs the service and in Windows services it lists with "MyService" name and empty description. How to define a different name and insert a description (to be seen when running services.msc )? Note: I need this because on the same machine i need to install more times the same service (1 per database). Currently the only workaround i foudn is to

UWP App Communication with Windows Service

女生的网名这么多〃 提交于 2019-12-03 19:34:48
问题 We are fixing to re-architect an application and are debating whether or not it is possible to use UWP instead of an ordinary WPF application. Our application needs the ability the access the entire filesystem and all system resources. This is an issue since UWP apps are sandboxed. However, we are trying to bypass that issue by trying to approach it in this manner: Windows Service -> Running on the system at all times. This will host the core functionality when it comes to accessing and

How do you run jvisualvm.exe under the local system account under Windows Server 2008?

我怕爱的太早我们不能终老 提交于 2019-12-03 19:07:08
I've been looking for a comparable approach as posted here for Windows Server 2003 for starting jvisualvm under system account. But I got the error: ...\jdk1.6.0_24\bin\jvisualvm.exe exited on ... with error code -1073741819. I found that jvisualvm is using a configuration file: ...\jdk1.6.0_24\lib\visualvm\etc\visualvm.conf This configuration file contains a default_userdir property that points to ${HOME}/... . The system account seems to have issues with ${HOME} . Changing this parameter and replace ${HOME} with C:/Temp makes the above mentioned solution available for Windows Server 2008 R2

How do you run jvisualvm.exe under the local system account under Windows Server 2003?

大城市里の小女人 提交于 2019-12-03 18:22:11
I am running GlassFish 3.0.1 as a windows service under Windows Server 2003 with Java 1.6 u 20, and am generally happy. I would like to be able to use VisualVM on this JVM and used Unable to use JConsole with Tomcat running as windows service as a starting point, but starting with PsTools\PsExec.exe -i -s "C:\Program Files\Java\jdk1.6.0_20\bin\jvisualvm.exe" results in a jvisualvm.exe and a nbexec.exe process showing up in Task Manager with SYSTEM as the user but I do not see any GUI from the program as I do when I run it manually as myself. I am logged in with Remote Desktop from Windows 7 in

Windows Service or SQL Job?

旧街凉风 提交于 2019-12-03 17:43:49
问题 I have an archiving process that basically deletes archived records after a set number of days. Is it better to write a scheduled SQL job or a windows service to accomplish the deletion? The database is mssql2005. Update: To speak to some of the answers below, this question is regarding an in house application and not a distributed product. 回答1: It depends on what you want to accomplish. Do you want to store the deleted archives somewhere? Log the changes? An SQL Job should perform better

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

你离开我真会死。 提交于 2019-12-03 17:14:38
I have installed SlikSVN and I'm trying to set up svnserve. SlikSvn is installed in C:\Program Files\SlikSvn and C:\Program Files\SlikSvn\bin is in the path. The registry entry for the service is currently" svnserve.exe --service -r "C:\SVNReposities" DisplayName= "Subversion" depend= Tcpip start= auto However, when I try and start the service I get the following error: Could not start SVNService service on Local Computer Error 1053: The service did not respond to the start or control request in a timely fashion. If I change the registry entry to" svnserve.exe --service -r "C:\SVNReposities"

how to install multiple instance of same windows service

我的梦境 提交于 2019-12-03 16:58:58
问题 I created one windows serives It gets the name of the service from web config file. I used the below link for getting value from webconfig. http://www.codeproject.com/KB/dotnet/MultipleInstNetWinService.aspx for installing my windows service,i just click the icon and install again, i change the value in config file and rebulid my application. again i try to install, it shows error like the specified service already exist. How to install multiple instance of same windows service? Thanks, Pooja

.Net Windows Services and InstallState file - is it really needed?

雨燕双飞 提交于 2019-12-03 16:52:17
问题 I've got a number of managed code Windows Services for which we use the Frameworks InstallUtil tool to install into the service control manager. This tool creates a new file at install time with an extension of .InstallState. I have experimented with deleting this file and an uninstall still works fine afterwards. So my questions is, what is this file for and is there any reason I shouldn't delete it? Edit 5/3/10: Really? Nobody has any clue what the value of this file is? 回答1: In VS.NET you