Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有启动时显示注册窗口的程序。当我设置登录名和密码时,程序必须在 Program File/SomeProgram 目录中创建一些文件。我需要此程序的管理员权限。
如果程序未注册,如何以管理员权限运行程序?所以我在创建文件时需要设置管理员权限。我需要一些示例代码。
您可能会考虑写入 CommonAppData 特殊文件夹,而不是 Program Files。