windows-services

VS Setup Project Windows service questions

My setup project installs a windows service. Right now this action is in the Install category. Would the commit category be a better location for it? I've added a custom action to remove the service in the Uninstall category, but when I run the uninstall, the user is prompted to shut down the service. As the user should never really kno...

UnauthorizedAccessException While Attempting to Change File Permissions

I trying to modify permissions programmatically using a C# windows service that is running under an administrator's account in windows XP. Another program is saving and modifying files on the local file system, in way that, after that program touches something, only the "SYSTEM" account, there after, may access it (unless I manually ch...

Check if a windows service is running?

I need to check whether my window service is running or not every 15 minutes or so. If it is not running, then how can I restart the windows service again? ...

how to map network drive for Clearcase View in Windows service ?

Hi, I want to map a clearcase view on network drive inside a windows service. I have tried with net use command, but it did not work properly. ...

How to introduce a new service account to an existing C# windows service

Hi. I have a windows service that is currently running as LocalSystem. At this point it cannot acess a network drive that it needs to. (I've been substituting local drive for testing). Now I have a newly created service account for me that has been given permisions to the shared drive. I am not sure how to "cut over" my C# app to use t...

JRun/Coldfusion - System.out - how to prevent it getting too large?

I am running ColdFusion 8 application servers on Windows machines. ColdFusion is running as a Windows service. I have noticed that System.out file is massive (1GB+) on some of the machines. e.g. C:\ColdFusion8\runtime\bin\System.out I understand this is where console output ends up when running CF as a service, but is there any...

Click-once for services?

I have an app that runs as a service, and I'd like it to be able to check a URL to see if a new version is available, and if so to download and install it. I can manually hack something together, but would be great if I could create an MSI package to update the service, and any other components that are part of my distribution. I'd also ...

Service has zero application (non-infrastructure) endpoints

Hello, I recently created a WCF service (dll) and a service host (exe). I know my WCF service is working correctly since I am able to successfully add the service to WcfTestClient. However, I seem to be running into an issue when I comes to utlizing my WCF from a service host (exe). I can add a reference to the WCF (dll) to my servic...

How to start a service after installing it?

Possible Duplicate: Automatically start a Windows Service on install I have a Windows service that I've flagged for automatic start-up in its installer. I use a Setup Project to install the service, which works fine, but I can't figure out how to get it to automatically start the service. Is there a way I can tell either the ...

starting windows service development using .net

I have started working with the C# from couple of months and now i am starting with the windows service. MSDN is good as always to start with but i would like to know if there is book, blog ... etc (dedicated) for this which could be a nice starting point ? ...

Getting Application Path - WPF versus Windows Service

I need to know a reliable way I can determine the folder that a windows service was started from. The way of determining this seems to be different than the way you'd determine it in a WPF applciaiton. More Details (optional reading): I have an embedded sql database that is used by both a WPF application and a windows service. During ...

error C2065: 'AfxBeginThread' : undeclared identifier

I have a simple ATL Service in which I have included the following statement. AfxBeginThread(WorkerThread, this, THREAD_PRIORITY_NORMAL, 0, 0); But the compiler complains that error C2065: 'AfxBeginThread' : undeclared identifier But in MSDN i found that AfxBeginThread is found in AFXWIN.H If I include AFXWIN.H, the compiler...

Windows Service is started but does not do anything - .NET

I have a .NET Windows Service (.NET 3.5) with a timer (System.Timers.Timer). The OnElapsed method looks like this: private void OnTimerElapsed(object source, ElapsedEventArgs e) { lock (this) { timer.Stop(); //process some stuff here.. ProcessStuff(); timer.Interval...

Alternative to "Allow service to interact with desktop"?

I have a windows service (C#) installed on a server that launches every 10 minutes an executable file (C#) to process some images from one directory to another. No interaction is required with any user. Nevertheless, since the executable file as an output window, to make the service run I have to enable the "Allow service to interact wit...

Please Help Me with these C# Compiler Errors

I have created the following C# windows service to send email to all the subscribed users of my asp.net 3.5(C#) website, daily and/or weekly depending upon their subscription type. using System; using System.Security; using System.Web; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Diagnos...

How to determine if a machine is running Active Directory

I would like to know from Java code if the machine that I'm on is running active directory or that it has active directory installed (e.g. service may be stopped). Is there a reliable registry key to inspect? This is specifically for Windows 2008. I found info on the web that mentions HKLM\SOFTWARE\Microsoft\MSDTC\Security\DomainControl...

How do processes work with windows services?

I have a widows service that is scheduled to run every hour or so. It basically calls a static method in a referenced assembly. My concern is that the method wont finish running during the hour period, so if it is overlapping it will cause some problems, im using lock statement around the method body. my question is this... will the ...

Service Watch-dog design

Hello I am working on a legacy product which has seven Windows services and a user interface. There are some bugs in the services which causes crash in every 10-15 days. I need to write an application to monitor the state of the services. If the services get crashed I need to send an e-mail to the administrator to start the services. I...

Folder to dump windows service log files

Short: What's the most appropriate folder for windows service to dump log files into? Details I have a windows service that produces log files that a low-tech end user might be interested to look at (actual communication between a computer and a manufacturing line monitoring sensors). The computer is a stand-alone dedicated computer...

problems with singleton COM servers and windows services

Hi, I am using Windows XP SP2, VS 2008 SP1 like this: brought up 2 singleton COM servers out of process in c++ one GUI app in c++ The GUI app used to instantiate both singleton COM servers and then two other programs used to load each singleton COM server - one server for the first prog, the other for second prog. All went well mi...