[英]How can I create and save file in Program File directory in Windows 7?
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.
当我设置登录名和密码时,程序必须在Program File / SomeProgram目录中创建一些文件。 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.
我需要一些示例代码。
您可以考虑写入CommonAppData特殊文件夹,而不是Program Files。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.