How can I create and save file in Program File directory in Windows 7?

天大地大妈咪最大 提交于 2019-11-28 10:39:52

问题


I have the program that show the registration window when it was started. When I set login and password the program must create some file in Program File/SomeProgram directory. I need administrator rights for this program.

How can I run program with administrator rights if program isn't registered? So I need set administrator rights when I create file. I need some example code.


回答1:


You might consider writing to CommonAppData special folder, instead of Program Files.



来源:https://stackoverflow.com/questions/10648798/how-can-i-create-and-save-file-in-program-file-directory-in-windows-7

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!