Nick
Nick

Reputation:

Windows service on server wont run without a user logged in

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.

Upvotes: 1

Views: 7636

Answers (3)

sindre j
sindre j

Reputation: 4444

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.

Upvotes: 2

Codex
Codex

Reputation: 1022

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?

Upvotes: 0

DonkeyMaster
DonkeyMaster

Reputation: 1342

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?

Upvotes: 0

Related Questions