[英]How can I create and save file in Program File directory in Windows 7?
[英]Where can my “out of the box” program create directory reliably in Windows?
例如,如果我的程序嘗試使用C:\\ProgramFiles (x86)\\[install directory]\\
CreateDirectory()創建目錄,則由於權限問題而失敗。
我聽說理想的位置是C:\\Users\\[username]\\AppData\\Local\\
,但是還有其他“安全”位置嗎?
當然,它可能會有所不同,具體取決於Windows的版本。
您是指確定機器特定Temp文件夾的方法嗎? 那么這應該是有用的: http : //msdn.microsoft.com/en-us/library/windows/desktop/aa364992%28v=vs.85%29.aspx
C:\\ ProgramData是常用的其他位置。 以下是有幫助的, http://blogs.msdn.com/b/cjacks/archive/2008/02/05/where-should-i-write-program-data-instead-of-program-files.aspx
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.