1

I'm trying to create a process which a wpf application. In Visual Studio debugging mode, it runs perfectly but windows service cant create it with gui.

I'm using CreateProcessAsUser() with WTSQueryUserToken(), DuplicateTokenEx().

But WTSQueryUserToken() return false cause of privilege, and i cant run my app.

I have searched similar problems but i couldnt find a solution for my problem.

  • Do you mean that WTSQueryUserToken is returning FALSE and GetLastError is returning 1314, " a required privilege is not held by the client?" Are you running as local system? Have you enabled SE_TCB_NAME? Possible duplicate: https://stackoverflow.com/q/1288965/886887 – Harry Johnston Jul 30 '17 at 03:56

1 Answers1

-1

Just like my problem before; applications which working with manifest files, you have to disable Run all administrator in Admin Approval Mode.

You can check: https://social.technet.microsoft.com/Forums/windowsserver/en-US/0aeac9d8-3591-4294-b13e-825705b27730/how-to-disable-uac?forum=winserversecurity

  • Bad idea. *Very* bad idea. You're sabotaging the security of the computer because you don't want to bother doing things the right way. – Harry Johnston Jul 31 '17 at 21:34