type
DEF_REC_SHELLFOLDER_INFO=record
AdminTools :STRING;
AppData :STRING;
Cache :STRING;
CDBurning :STRING;
Cookies :STRING;
Desktop :STRING;
Favorities :STRING;
LocalAppData :STRING;
LocalSetting :STRING;
Personal :STRING;
MyDocuments :STRING;
MyMuisc :STRING;
MyPictures :STRING;
MyVideo :STRING;
NetHood :STRING;
PrintHood :STRING;
Programs :STRING;
Recent :STRING;
SendTo :STRING;
StartMenu :STRING;
StartUp :STRING;
Templates :STRING;
AllUserAdminTools :STRING;
AllUserDesktop :STRING;
AllUserAppData :STRING;
AllUserFavorites :STRING;
AllUserPrograms :STRING;
AllUserStartMenu :STRING;
AllUserStartUp :STRING;
AllUserTemplates :STRING;
AllUserMusic :STRING;
AllUserPictures :STRING;
AllUserVideo :STRING;
AllUserDocuments :STRING;
AllUserPersonal :STRING;
oInit :BOOL; END;
//-----------[SHELL FOLDER]-----------------------------------------------------------------------
FUNCTION FkShellFolderInit():BOOL;
VAR reg : TRegistry;
BEGIN
reg:=TRegistry.Create;
//[CURRENT USER]-------------------------------------[]
reg.RootKey:=HKEY_CURRENT_USER;
reg.OpenKey('Software/Microsoft/Windows/CurrentVersion/Explorer/Shell Folders', false);
//[READ DATA]
PUB_REC_SHELLFOLDER.AdminTools:=reg.ReadString('Administrative Tools');
PUB_REC_SHELLFOLDER.AppData:=reg.ReadString('AppData');
PUB_REC_SHELLFOLDER.Cache:=reg.ReadString('Cache');
PUB_REC_SHELLFOLDER.CDBurning:=reg.ReadString('CD Burning');
PUB_REC_SHELLFOLDER.Cookies:=reg.ReadString('Cookies');
PUB_REC_SHELLFOLDER.Desktop:=reg.ReadString('Desktop');
PUB_REC_SHELLFOLDER.Favorities:=reg.ReadString('Favorities');
PUB_REC_SHELLFOLDER.LocalAppData:=reg.ReadString('Local AppData');
PUB_REC_SHELLFOLDER.LocalSetting:=reg.ReadString('Local Settings');
PUB_REC_SHELLFOLDER.Personal:=reg.ReadString('Personal');
PUB_REC_SHELLFOLDER.MyDocuments:=reg.ReadString('Personal');
PUB_REC_SHELLFOLDER.MyMuisc:=reg.ReadString('My Music');
PUB_REC_SHELLFOLDER.MyPictures:=reg.ReadString('My Pictures');
PUB_REC_SHELLFOLDER.MyVideo:=reg.ReadString('My Video');
PUB_REC_SHELLFOLDER.NetHood:=reg.ReadString('NetHood');
PUB_REC_SHELLFOLDER.PrintHood:=reg.ReadString('PrintHood');
PUB_REC_SHELLFOLDER.Programs:=reg.ReadString('Programs');
PUB_REC_SHELLFOLDER.Recent:=reg.ReadString('Recent');
PUB_REC_SHELLFOLDER.SendTo:=reg.ReadString('SentTo');
PUB_REC_SHELLFOLDER.StartMenu:=reg.ReadString('Start Menu');
PUB_REC_SHELLFOLDER.StartUp:=reg.ReadString('Startup');
PUB_REC_SHELLFOLDER.Templates:=reg.ReadString('Templates');
reg.CloseKey;
//[ALL USER ]-------------------------------------[]
reg.RootKey:= HKEY_LOCAL_MACHINE;
reg.OpenKey('Software/Microsoft/Windows/CurrentVersion/Explorer/Shell Folders', false);
PUB_REC_SHELLFOLDER.AllUserAdminTools:=reg.ReadString('Common Administrative Tools');
PUB_REC_SHELLFOLDER.AllUserDesktop:=reg.ReadString('Common Desktop');
PUB_REC_SHELLFOLDER.AllUserAppData:=reg.ReadString('Common AppData');
PUB_REC_SHELLFOLDER.AllUserFavorites:=reg.ReadString('Common Favorites');
PUB_REC_SHELLFOLDER.AllUserPrograms:=reg.ReadString('Common Programs');
PUB_REC_SHELLFOLDER.AllUserStartMenu:=reg.ReadString('Common Start Menu');
PUB_REC_SHELLFOLDER.AllUserStartUp:=reg.ReadString('Common Startup');
PUB_REC_SHELLFOLDER.AllUserTemplates:=reg.ReadString('Common Templates');
PUB_REC_SHELLFOLDER.AllUserMusic:=reg.ReadString('CommonMusic');
PUB_REC_SHELLFOLDER.AllUserPictures:=reg.ReadString('CommonPictures');
PUB_REC_SHELLFOLDER.AllUserVideo:=reg.ReadString('CommonVideo');
PUB_REC_SHELLFOLDER.AllUserDocuments:=reg.ReadString('Personal');
reg.CloseKey; reg.Free; PUB_REC_SHELLFOLDER.oInit:=TRUE;
END;
PUB_REC_SHELLFOLDER.MyDocuments 就是了