I am having an issue launching a process from the system account. I just want to make it clear that I am not trying to run it under an interactive session, nor trying to impersonate any account. All I am trying to do is launch a process from the system account into the same session. The session in which the NTAUTHORITY\SYSTEM resides is 0 I believe.
I created a simple Windows Service that basically just uses Process.start to launch the executable. The Service is a system service.
I installed the service using SC as such:
sc create "MYSERVICE" binpath= "C:\Projects\MyService\MyService.exe" displayname= "My Awesome Service"
When I try to manually start the service I get a prompt that says "The ServiceName service on local computers started and then stopped. Some services stop Automatically if they are not in use by other services or programs."
Along with this the executable is never actually started. When monitoring it in processhacker I can see that the service does start, but the executable it attempts doesn't. Can anyone help me figure out why?
As I stated earlier my service is very basic, all it does is try and launch the executable when started:
protected override void OnStart(string[] args)
{
Process.Start("svrexec.exe");
}
protected override void OnStop()
{
}