1
votes

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.

1
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: stackoverflow.com/q/1288965/886887Harry Johnston

1 Answers

-1
votes

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