I'd like to periodically run an arbitrary .NET exe under a specified user account from a Windows Service.
So far I've got my windows service running with logic to decide what the target process is, and when to run it.
The target process is started in the following manner:
The Windows Service is started using "administrator" credentia...
I've upgraded a [.vdproj MSI generator project built into VS2008] System.Configuration.Install.Installer with a ServiceProcessInstaller and a ServiceInstaller from Visual Studio 2005 to 2008. There are no customisations of consequence to the installer class (i.e., not trying to start or stop services or register children)
RemovePrevious...
When a .Net service crashes, does the ServiceBase.OnStop method get called? Will the service be marked as stopped regardless of whether or not the OnStop method is called?
...
I have a windows service written in dotNet. There is a worker service that spawns worker threads using various Delegate.BeginInvokes. When the service crashes are those threads going to be cleaned up automatically? And if so, when?
...
I have a dotnet windows service that's currently hung, but running. Is there anyway to attach a debugger to it, despite the lack of symbols; and that it's already running?
...
Hi,
I have a windows service that runs fine, but I have to have it run under a special user account.
Currently I go into services and change the logon as section, but for deployment this has to be done more professionally.
Is there a way for me to have it logon as a custom user account programatically, or during the installation proce...
Hi,
I want to store the username/password information of my windows service 'logon as' user in the app.config.
So in my Installer, I am trying to grab the username/password from app.config and set the property but I am getting an error when trying to install the service.
It works fine if I hard code the username/password, and fails wh...
Hi,
In my .net windows service, when my timer elapses and my main method is called, is it best practice to put the timer in sleep mode?
This is in case my main method runs for too long, and the timer elapses before the previous calls main method finishes its execution.
...
I need to create a Windows service that works just like the task scheduler in that I can configure what time it runs and it basically just calls a .NET class at that scheduled time (recurring). What is the recommended way to do this? Also, any information on installing/removing that service would be appreciated!
Update: Using the task s...
I'm using the UPS service to monitor the state of my UPS from an application -- the key at HKLM\SYSTEM\CCS\Services\UPS\Status has all the information you can get from the Power control panel. BUT -- I'd like to be able to tell the UPS to shut down from my app as well. I know that the service can tell the UPS to shut down -- for instan...
I'm trying to connect to a remote SQL Server 2005 db from a .NET Windows service running in Vista Home Premium x64. I can access the remote db from a console app with no problem. I can connect to a local db from the Windows service with no problem. I was able to connect from a service from XP with no problem. There's no firewall or anti-...
What are the cons and pros of windows services vs scheduled tasks for running a program repeatedly (e.g. every two minutes)?
...
According to MSDN, it is not a particularly good idea to use classes within the System.Drawing namespace in a Windows Service or ASP.NET Service. Now I am developing a class library which might need to access this particular namespace (for measuring fonts) but it cannot be guaranteed that the host process is not a service.
Now there is ...
I already asked this question at the JOS-.NET board but Joel is closing that board down so here it is again:
Do web hosting providers allow you to install Windows Services? I want to play around with some automation stuff, which I can currently do fine from my own dev pc, but I would like to start opening this stuff up to the public. Ho...
I have a Deplhi based Windows Service that, on installation, parses some command line arguments. I want those arguments to be added to the services command line (ImagePath value on the registry) so that the service is always started with them.
How can I accomplish this?
I want the regedit look like this:
at registry key HKEY_LOCAL_MACH...
How do you write an in-process WMI provider as part of Windows Service written in .NET?
I've written a provider that uses the de-coupled hosting model as a standalone application, but can't figure out how to get a Windows Service that uses the Hosting Model = ManagementHostingModel.NetworkService to work.
This is the kind of provider I...
My goal is logout current session, then delete the running local user profile. And I have a service to delete the profile already.
My problem is, the user has no idea about the background service and who may power off the machine or login again too soon.
The idea is that the service will show some popup, and it will not display "Welco...
I have a windows service written in c#. It has a timer inside, which fires some functions on a regular basis. So the skeleton of my service:
public partial class ArchiveService : ServiceBase
{
Timer tickTack;
int interval = 10;
...
protected override void OnStart(string[] args)
{
tickTack = new Timer(1000 * ...
Hi,
I have a WCF service that I call from a windows service.
The WCF service runs a SSIS package, and that package can take a while to complete and I don't want my windows service to have to wait around for it to finish.
How can I make my WCF service call asynchronous? (or is it asynchronous by default?)
...
How do I determine what account a service is running as from within the service itself.
...