注册表对应的位置:
HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Explorer/Shell Folders
Cache=F:/Temporary Internet Files/Temporary Internet Files
HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Explorer/User Shell Folders
Cache=F:/Temporary Internet Files/Temporary Internet Files
HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Internet Settings/Cache/Paths
Directory=F:/Temporary Internet Files/Temporary Internet Files/Content.IE5
procedure TForm1.Button3Click(Sender: TObject);
var
s:string;
begin
setlength(s,256);
setlength(s,GetWindowsDirectory(pchar(s),length(s)));
s:=s+'/Temporary Internet Files';
showmessage(s);
end;
function CookieFolder: string;
const
SCacheKey = '/Software/Microsoft/Windows/CurrentVersion/Explorer/Shell Folders';
var
Reg: TRegistry;
begin
Result := '';
Reg := TRegistry.Create;
try
Reg.RootKey := HKEY_CURRENT_USER;
if Reg.OpenKey(SCacheKey, False) then
Result := Reg.ReadString('Cache');
finally
Reg.Free;
end;
end;
多谢,多谢,可惜我这个帖就只有50分,应该多放点
我要的是这个位置
HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Explorer/User Shell Folders
Cache=F:/Temporary Internet Files/Temporary Internet Files