Run a UserProcess from Windows service in user Desktop

Windows Service

I have been wondering is there any easy method to start a process on user desktop from a windows service for a long time. During my research i came across a lot of security issues like system process blah blah etc… finally i got it working using some win32 API like

  • WTSGetActiveConsoleSessionId
  • WTSQueryUserToken
  • CreateProcessAsUser

i wrote a c# wrapper class for simplicity  and it will be like

 

Continue reading Run a UserProcess from Windows service in user Desktop