views:

948

answers:

4

I created a windows service that's basically a file watcher that wont run unless a user is logged into the machine its on. The service is running on a Windows Server 2003 machine. It is designed to move the files that are put into one directory into a different directory based on keywords in the file names, but none of the files move until i log on, then all the files move at once.

A: 

How is your service configured? More information may be helpful. Is the service set to Log on as the Local System account, or as a specific windows account? Is the startup set to Manual, or Automatic? Does the service run a scheduled task? If so, what configuration is on the scheduled task?

Jay S
A: 

There has to be some setup problem with your service. Windows Server doesn't have a problem running applications without a user logged in (otherwise, scheduled tasks would be a lot less useful).

How did you install the service?

DonkeyMaster
A: 

A few clarifications are required:

  • You mentioned

a file watcher that wont run unless a user is logged into the machine its on

How has this been implemented? Generally, services are automatically started when the machine boots because each windows service runs under a different windows station, with an independent security context

  • You also mention

but none of the files move until i log on

Is this not contradicting the first point, since this is what it has been implemented to do? [Am assuming the above point has been implemented]

  • Is the service configured to run under a special account?
  • Has the server been configured to require special rights to move files on the FileSystem?
Codex
+1  A: 

You probably have to set the service to log on as a spesific user, try going into services, doubleclick the service and select "log in as account", and then provide your account details (domain\username and password).

The LocalService account has extensive rights, but may lack the rights to spesific users files/folders for instance. You could alternatively try to grant file rights to the LocalService account spesifically. I would however try the "log in as" trick first, as it's a 1 minute job. If it works you could create a spesific account to run the service as, alternatively grant rights to LocalSystem.

Btw: If it's networked files you might try the NetworkedService account.

sindre j