windows-services

How can I create a windows service in Delphi?

I have been assigned an assignment to create such a service in delphi which will track the logged in user activity on the computer. For this i have to I want my service to be run in the background and should store the name of every ACTIVE window in particular time events. Learn how to create windows service in delphi How should I get...

Installing a windows service from a Visual Studio Installer project

A colleague has written a Windows Application and left me to do the installers. I have created the installer project through Visual Studio and added the primary output of the service project to the new project. When I run the installer it creates the correct folders and copies the dlls, exe and config file in, but it doesn't do the act...

.NET 1.1 Windows service doesnt start due to leap year

We have a few backend windows services written in .net framework 1.1 running and on December 31st 2008 around 5.00 pm (EST) we stopped these services to run some year end reports.After the reports were run , we tried to start the services and the moment we attempt , it would give an error "Service did not start in a timely fashion".We tr...

Visual Studio missing "Add Installer" link in service project

I'm building a Windows service and following this MSDN article, but I'm stuck on step 3 under "Create an installer". I can't find the "Add Installer" link it's referring to. I've clicked everywhere, including following the instructions it gives exactly, but I can't seem to find it. A few people on Google have had the same problem, but ne...

throwing an exception in a windows service

Hi, Does throwing an exception in a windows service crash the service? i.e. it will have to be restarted manually Note: I am throwing the exception from within the catch clause. ...

Detect if code is running as a service

Is there a way for an .NET library to detect whether or not it is being run as a service? My library can be run either way. But when its run as a service, developers need to call an additional method indicating that fact or certain features won't work correctly. I want my library, which handles logging, to write a warning if it is used...

Run batch file as a Windows service

In order to run one application, a batch file has to be kicked off (which does things like start Jetty, display live logs, etc). The application will work only if this batch file is running. I am hence forced to have this batch file running and not logout from the Windows server. Can this batch file be run as a service? I am experimenti...

C# Run Windows Form Application from Service (and in Vista)

I am writing an application in C# that needs to run as a service but also have user interaction. I understand that services have no UI, etc, so I've divided up my program into a windows form application and a service that can communicate with each other. The problem I'm having is that I need the service to make sure the windows form ap...

Print html document from Windows Service without print dialog

I am using a windows service and i want to print a .html page when the service will start. I am using this code and it's printing well. But a print dialog box come, how do i print without the print dialog box? public void printdoc(string document) { Process printjob = new Process(); printjob.StartInfo.FileName = document; p...

How to write c# service that I can also run as a winforms program?

I have a windows service written in C# that acts as a proxy for a bunch of network devices to the back end database. For testing and also to add a simulation layer to test the back end I would like to have a GUI for the test operator to be able run the simulation. Also for a striped down version to send out as a demo. The GUI and service...

Deleting files using a service application

I am using a FileSystemWatcher in VS2005 to monitor directories and thought to change the application to a service. Eveverything woks fine until the service tries to delete a file. Sending the exception to the eventviewer, I get a System.UnauthorizedAccessException. The file in question (testing) can be deleted by the same FileSystemWatc...

Can Window application continue to run despite computer going to standby mode?

I am developing a Windows application using C#.net. This will accept the login details, validate the login and then keep running unattended till the time the computer is on. This computer won't do anything else and go to standby mode after a few minutes as per the security policy. Is there a way to configure my application to avoid goi...

Update Windows Service Assembly Without Restart It ?

How can I update some Windows Service Seperated Assemblies without restarting the service? Note: This Windows Service hosted WCF Services, so in addition without restarting the service and so don't shutdown down WCF Clients .. ...

Controlling start up sequence of a windows service

I have a windows service installed using installutil and set to "Autostart". My problem is that when some servers are rebooted it attempts to start before "Microsoft SQL service" has started- I can see this by looking at the event log during a system restart. What is the best way of making my service "auto start" AFTER Sql server service...

What is the benefit of developing the application as a windows service?

I am going to develop an application which will process online data (comming through socket) and it does not need any user interaction. I am thinking of a simple console application, but what about windows service does it provide extra benefit? (I know windows service does not need user logged in to run the service but I am asking about...

How do I eliminate "The specified service already exists" when I install new versions of my software?

I have a VS2008 application that includes a service project (I'll call it ServiceProject). I have the installation project (InstallationProject) set to RemovePreviousVersions. Additionally, I have Custom Actions set for InstallationProject, to Install, Commit, Rollback, and Uninstall the Primary output from ServiceProject. Sometimes...

System.Diagnostics.Process.Start() cannot start process when called from Windows service.

I am trying to start an external process from a .NET Windows service. In the past I have used the Process.Start() overload that takes the executable path and a command line string. This works. But now I would like to start the process and have it run in the context of a particular user. So I call this version of Start() public static Pr...

get computer name from within a windows service

Hi, In a .net windows service (C#), how can I get the computer name? Is this a reliable method, or should I wrap it in try/catch? ...

ClickOnce deploy a Windows Service?

Is it possible to deploy a Windows Service using ClickOnce? If so, how do you achieve this? Currently we have to use a Deployment project, and the installation process could be simplified greatly by using ClickOnce. ...

Remote debugging of a Java application launched as a Windows service

My Java application is started from within a native program through java.dll. This native program is launched as a service on Windows. The following options have been added to the JVM args for remote debugging: -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n In this configuration, it is impossible to c...