开发者

Impersonation in windows application

开发者 https://www.devze.com 2022-12-21 12:55 出处:网络
I\'ve written a开发者_StackOverflow中文版n extremely simple program to load an xml from one path and store it in All Users/Application Data. But i\'m getting access denied error. So i want to imperson

I've written a开发者_StackOverflow中文版n extremely simple program to load an xml from one path and store it in All Users/Application Data. But i'm getting access denied error. So i want to impersonate the admin account and save the file. How to do that?

Thank you.

Regards NLV


See this MSDN Article. for an example of impersonation. Another thought, wouldn't it be easier to just change the file's permissions? It is going to be able to be seen by everyone anyway. Also, you would have the added benefit of not having to secure the Admin password.

0

精彩评论

暂无评论...
验证码 换一张
取 消