Closed hedbisker closed 6 years ago
It means that this call is failing. You need to find the reason for it and eliminate it. Good luck! Read up in the closed issues for troubleshooting. Start here https://github.com/murrayju/CreateProcessAsUser/issues/18 and follow the links.
Most likely a permissions problem, are you running the service as the System
account?
You could also try calling the win32 GetLastError()
for more clues.
@hedbisker do you need any more help with this?
@AndrewSav No, thank you
In this line if (WTSQueryUserToken(activeSessionId, ref hImpersonationToken) != 0)
the method WTSQueryUserToken return 0