0

Right now, I currently have this working, but it's a workaround, which won't be optimal in the future.
I'm currently writing a service which will have to pass some command line arguments to a program, which will then handle some things behind the scenes that I don't need to worry about.
The problem i'm having is: Right now when I install my service, I need to go into the service's properties, and log in to it as my user. If I use the Local System (with interact with desktop checked), It doesn't work. (It actually doesn't fail either, which is strange, but aside the point).
I'm wondering if there is a General user I can programatically log in to (Like Network Service), which will get this to work. Or is it maybe a permissions issue?

Shreyos Adikari
  • 12,348
  • 19
  • 73
  • 82
Adam Sweeney
  • 386
  • 3
  • 15

1 Answers1

1

To start external program from windows service, you need to use WinAPI function CreateProcessAsUser. See this post.

Community
  • 1
  • 1
Alexander
  • 4,153
  • 1
  • 24
  • 37