Reputation: 148
I want a way in Delphi which I can run an exe file as a different user in order to gain different permissions. I do not want elevation of permissions. Screenshot:
I want from delphi code to start an application as a different user as depicted in the picture.
Upvotes: 7
Views: 2642
Reputation: 613053
The API function that you are looking for is CredUIPromptForCredentials
. This returns a username and password that you can pass to CreateProcessWithLogonW
.
Upvotes: 11