0

I'm trying to start a process as a different user. This process starts a pdf converter, with session id equal to 0. It has a problem.. it stops randomly! Maybe because of some calculation or a Gui problem of this converter? We can't even change that program. So, I tought it can be caused by the isolation of the session id running with 0. I have a service running in Windows 7. In Windows 7 all services run in Session 0. From that service I want to create an interactive user session (in a session other than Session 0) and start an application in that session. My problem is that when I call LogonUser to start an interactive user session and then use CreateProcessAsUser to start the application the application ends up running in Session 0.

For this reason I'm trying to do this solution. The condition is that it must starts with session id not equal to 0, running in a scheduler.

  • If nobody's logged in, there aren't any other sessions. You're approaching this from the wrong direction - if the PDF converter is trying to display UI and there's no way to tell it not to, it's **not the right tool for the job**. However much you may be attached to it, it's time to look for an alternative. – Damien_The_Unbeliever Feb 15 '19 at 09:11
  • And even if you managed to get an interactive session with no user logged in, how's that going to help you when the program's waiting for someone to press "OK" on a button? – Damien_The_Unbeliever Feb 15 '19 at 09:16
  • Hi @Damien_The_Unbeliever thank you for replying me. The program does not prompt anything. It runs in background. Do you have any solution even if there is a runnning session? – fran openey Feb 15 '19 at 09:24
  • What do *you* think it's doing when it "stops randomly"? In my experience, what it actually means is "it tried to display a prompt and (because it's in a non-interactive session) nobody can interact with that prompt". – Damien_The_Unbeliever Feb 15 '19 at 09:41
  • @Damien_The_Unbeliever Can i launch a interactive process from an non-interactive session? – fran openey Feb 15 '19 at 10:34

0 Answers0