CreateProcessAsUser icon indicating copy to clipboard operation
CreateProcessAsUser copied to clipboard

CreateProcessAsUser not ruinning my wpf application.

Open OmChetu opened this issue 7 years ago • 3 comments

i want to run my wpf application through CreateProcessAsUser but its not running. why? ProcessExtensions.StartProcessAsCurrentUser(@"C:\Program Files (x86)\myapp\WpfClient.exe");

Please provide need full help. Thanks

OmChetu avatar Jun 20 '18 12:06 OmChetu

I checked and found in my application was set as requireAdministrator in the manifest file. So now how to run this app with CreateProcessAsUser.

OmChetu avatar Jun 20 '18 13:06 OmChetu

I am getting this error "StartProcessAsCurrentUser: CreateProcessAsUser failed. Error Code -740 6/20/2018 11:42:52 PM" what is the solution of this ?

OmChetu avatar Jun 20 '18 18:06 OmChetu

Two thoughts here:

  • Make sure that the examples from this repo are working for you. When you are happy with that try to bridge the gap: you will have an app that works (from this repo) and the one that does not (yours) make changes to either of the two to bring them closer until you find the change which either break this app or fixes your app. At this point, it's likely that you have a fair idea of the cause. If not, please write all the details of the change that is the culprit here and we will try to help.
  • Error code 740 (see here) means that your process does not have required privileges. Similar issues were discussed previously, feel free to browse past issues in this repo, including closed, that might help you solve your problem.

AndrewSav avatar Jul 21 '18 01:07 AndrewSav