I have a program in which I need to make some changes in folders access right and normally, only the administrator user would be allowed to do that. However, for a particular case, I must be able to ‘pretend’ I am the administrator and make some changes even though the user who is running the application does not have administrator privileges.
Is there any way to perform such task ?
thanks
EDIT : Having the username/password is not a problem if this is required.
Something like this for current user:
If you are looking to impersonate specific user then some more work will be required:
http://platinumdogs.me/2008/10/30/net-c-impersonation-with-network-credentials/