Windows下幾個使用者目錄的獲取及其作用介紹

2021-09-02 02:00:25 字數 1049 閱讀 6470

userprofile=c:\users\***

alluserprofile=c:\programdata

homepath=c:\users\***

userprofile= c:\ documents and setting \***

alluserprofile=c:\documents and setting\allusers

homepath=c: \documents and setting\***

temp=c:\docume~1\***\locals~1\temp

tmp= c:\docume~1\***\locals~1\temp

alluserprofile-通常軟體的鑑權資訊寫入到

homepath-使用者目錄

temp/tmp- 臨時資料夾,可以隨時被清理

cstring spath;

spath.releasebuffer();

獲取臨時目錄temp/tmp:

// 獲取臨時資料夾

cstring stemppath;

::gettemppath(max_path, stemppath.getbuffer(max_path));

stemppath.releasebuffer();

cstring stempfile;

// 獲取臨時檔案: 輸入檔名字首,自動獲得乙個不重複的檔名

::gettempfilename(stemppath, _t(「mypre_」), 0, stempfile.getbuffer(max_path));

stempfile.releasebuffer();

系統目錄WINDOWS下幾個占用磁碟空間較大的目錄

1 c windows servicepackfiles servicepackfiles 資料夾中包含由 service pack 安裝的 windows xp 系統檔案的更新版本。在安裝了其他元件時,為確保使用最新的檔案版本,需要用到此資料夾。windows 檔案保護系統也使用此資料夾來還原損壞...

MFC 幾個使用者目錄的獲取

在window7中,進入命令列cmd模式,輸入set到多個系統目錄定義 例如 win7下 userprofile c users alluserprofile c programdata homepath c users xp下 userprofile c documents and setting...

Windows下如何改變目錄

cd命令是改變子目錄的命令。格式 cd 路徑 值得明確的是 cd命令只能進入當前碟符中的資料夾,改變操作的根目錄 改變操作碟符 則不需用cd。例如你當前是在c 盤下,要到d 盤,只需鍵入d 回車就行了。例項一 現在的位置是c盤,如果需要進入c盤的windows目錄,則輸入命令 cd windows,...