-1

I am trying to run an EXE file as a service with no user logged into the server. I have created the service and it starts up without a problem.

The problem is that the service only runs correctly when the user is logged in. This behavior is the same regardless of whether the service runs as an administrator or restricted user.

The EXE copies files from one directory to another. I verified that the user has permissions to both directories.

If I log in as the user and run the EXE file, it copies the files. Are there any Windows permissions (Group Policy or Local Settings) that may be preventing the EXE file from running as a service?

4
  • does the exe interact with the desktop?
    – tony roth
    Jul 21, 2011 at 2:51
  • I'm not sure. I was wondering that myself. It seems that if I create a service and use an account other than SYSTEM, I do not have that option.
    – John Smith
    Jul 21, 2011 at 2:57
  • 1
    The EXE may simply not run properly as a process. Not everything can, unfortunately.
    – mfinni
    Jul 21, 2011 at 5:18
  • whats the exe, is it a custom? anything in the logs?
    – tony roth
    Jul 22, 2011 at 20:53

1 Answer 1

1

Service exes need to be specifically written to be services—the start up to ensure integration with the Service Control Manager (SCM) is completely different.

This is the same kind of difference between a GUI application and a command line application.

It is possible, often with command line switches, to support multiple "modes of operation", but this is rarely done.

If the exe is not written to be a service (you should be seeing event log entries about it being shutdown due to not interacting with the SCM correctly) then consider using Task Scheduler to execute it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .