开发者

Impersonation in windows application

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜