windows-services

Path to the executable of a windows service.

How can I get the path to the executable of a specific windows service from another program ? Unfortunately the class ServiceController (System.ServiceProcess) doesn't provide a method or property for that ! ...

Unable to Access Remote server path through WCF service in XP

I created a wcf service hosted in windows service manager on windows XP sp3, and this service shall generates some file on shared drive/folder on remote PC. but when i try to give shared path as "\Server\SharedFolder" it gives Access Denied error and when i Map this drive as "Z:" it gives "Could not find a part of the path 'Z:\R1_180620...

PostThreadMessage to another process

I want to post a message to a thread that is running as another process (in particular as a windows service). I've read the documentation for PostThreadMessage but there are some things unclear for me. How do I get a handle for my service's thread? The system only does marshalling for system messages (those in the range 0 to (WM_USE...

Is it possible to login an account from a Windows Service?

Suppose that you have an account which must always be running. (yes I know the answer is use a service, but at this time it's not possible - legacy stuff :) that account has one or more critical applications which must always be running. if that account is unintentionally logged off, i'd like to have a service monitor it, and re-login...

Is it possible to programatically set the "Start Parameters" on a Windows Service at install time?

Is it possible to programatically set the "Start Parameters" on a Windows Service at install time? EDIT This isn't actually possible. However, you can edit the image path as per ho1's instructions. ...

issues getting .NET service installed

I've been having on and off issues trying to get a service installed. The problem is it installs fine on some machines, and others I either get that the service couldn't install because of incorrect permissions, or that the service could be started, and these are all administrator account. I'm installing it using Advanced Installer. Wha...

Visual Studio Windows Service Project and Service Name

I have a windows service project and a setup project. I can't figure out how to change the name of the actual service when it is installed (the name listed in windows services . . . services.msc). ...

Windows Service Looking for app.config and not app.exe.config

I'm trying to install a Windows Service on a 2008 server. The service was built with VS2010, targeting the 3.5 framework. A simple setup project was used to deploy the service. The install works fine and the service starts up appropriately. The bizarre issue I'm having is when the service executable, MyService.exe, is run it is looki...

Determining the reason why a .net windows-service won't start

I am trying to determine why a .Net service that I can successfully install on a wide number of machines won't start on certain machines. When the service is started on these machines the service instantly stops, so my assumptions are either that the users doesn't have sufficient privileges to install the service or that there is an iss...

How do you pass user credentials from one process to another for Impersonation in .NET 1.1?

I have a Windows Service (written in .NET 1.1) running under a specific user account and instances of the service running on several servers. I would like to pass user credentials (username, password, domain) to the service from a WinForms application and have the service read/write files in the server's local file system impersonating...

Cannot access files on drive mapped network share from a Windows service.

I have a network shared folder mapped to a drive letter, which is accessible from Windows Explorer, from the command prompt as well as from my WinForms application without problem. It is also accessible from my Windows service using a UNC path. However, when I attempt to access this network location using a mapped drive letter from the ...

Is Windows Communication Foundation the better alternative to the use of web and windows services

I was reading through introductory articles about windows communication foundation on MSDN and it looked to me like an alternative to using a windows or web services - (a much better alternative i thought). Is this the case or did i miss some thing - And yes i didn't read deeply. It looked to me like WCF is a better option to a window...

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

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 http://stackoverflow.com/questions/503057/unable-to-use-jconsole-with-tomcat-running-as-windows-service/812041#812041 as a starting point, but starting with ...

Windows services and multiple logged in users

I'm developing a Windows service which will run at a specific time every day. What will happen if multiple users are logged in to that machine? Will it run 5 times at the same time if there're 5 users logged in? If it does, is there a way to prevent it? ...

Running Tomcat Servlet as Windows Service

I have a servlet with its package comes with Tomcat preconfigured. A batch file is provided to start the servlet with Tomcat. Now I would like to install it as a windows service. I've done so successfully with exe such as SVN server, but since Tomcat starts with a batch file, I can't install the batch file as service, as it won't run and...

InvalidCastException of a Activator.CreateInstance object during an installation procedure

Hi I have the following procedure private static IMyInterface OpenInstance( string assemblyPath, string classType, string assemblyName, out AppDomain domainInstall) { IMyInterface interface = null; AppDomainSetup domaininfo = new AppDomainSetup(); domaininfo.ApplicationBase = assemblyPath; domainInstall = AppDomain.C...

Possible to launch a process in a user's session from a service?

In Windows Vista/7/2008/2008R2, is it at all possible to launch a process in a user's session from a service? Specifically, the local session would be most useful. Everything I've been reading seems to say this isn't possible, but I figured I'd ask here before giving up completely. My service signs on as Local System. I'm coding in V...

Build a simple web server that I can run as a windows service.

I'm a web developer so all my experience is with ruby, python, or PHP. However, I'm gonna do a little windows programming. I want to build a light weight web server that can handle incoming requests and pass them on to a COM port. I want to be able to distribute it as an exe that will install the server as a windows service. What do yo...

How to make windows service application so it can run as a standalone program as well?

I'll start with an example: Apache web server (under Windows) has a nice feature: it can be both run as a standalone application (with current users privileges), and that it can be installed and run as a windows service directly (as local system account), using same executable. In order for application to be run as a standalone app, all...

Windows service gives error 1053 - System.IO.DirectoryNotFoundException

I have a small console app containing a web server written in c#. When trying to convert it to windows service, i get a error 1053, and when i view the error log it shows: Application: YCSWebServerService.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.IO.Di...