Zitat von
messie:
War das nicht von Luckie?
Delphi-Quellcode:
function GetShellFolder(CSIDL: integer): string;
var
pidl : PItemIdList;
FolderPath : string;
SystemFolder : Integer;
Malloc : IMalloc;
begin
Malloc := nil;
FolderPath := '';
SHGetMalloc(Malloc);
if Malloc = nil then
begin
Result := FolderPath;
Exit;
end;
try
SystemFolder := CSIDL;
if SUCCEEDED(SHGetSpecialFolderLocation(0, SystemFolder, pidl)) then
begin
SetLength(FolderPath, max_path);
if SHGetPathFromIDList(pidl, PChar(FolderPath)) then
begin
SetLength(FolderPath, length(PChar(FolderPath)));
end;
end;
Result := FolderPath;
finally
Malloc.Free(pidl);
end;
end;
Das sollte auf allen Systemen funktionieren.
Grüße, Messie
Ok, thx
so nun mal eine kleine Liste.... ich finde den Ordner All Users\Documents nicht ...
000 C:\Documents and Settings\Jörg\Desktop
001
002 C:\Documents and Settings\Jörg\Start Menu\Programs
003
004
005 C:\Documents and Settings\Jörg\My Documents
006 C:\Documents and Settings\Jörg\Favorites
007 C:\Documents and Settings\Jörg\Start Menu\Programs\Startup
008 C:\Documents and Settings\Jörg\Recent
009 C:\Documents and Settings\Jörg\SendTo
010
011 C:\Documents and Settings\Jörg\Start Menu
012
013 C:\Documents and Settings\Jörg\My Documents\My Music
014 C:\Documents and Settings\Jörg\My Documents\My Videos
015
016 C:\Documents and Settings\Jörg\Desktop
017
018
019 C:\Documents and Settings\Jörg\NetHood
020 C:\WINDOWS\Fonts
021 C:\Documents and Settings\Jörg\Templates
022 C:\Documents and Settings\All Users\Start Menu
023 C:\Documents and Settings\All Users\Start Menu\Programs
024 C:\Documents and Settings\All Users\Start Menu\Programs\Startup
025 C:\Documents and Settings\All Users\Desktop
026 C:\Documents and Settings\Jörg\Application Data
027 C:\Documents and Settings\Jörg\PrintHood
028 C:\Documents and Settings\Jörg\Local Settings\Application Data
029
030
031 C:\Documents and Settings\All Users\Favorites
032 C:\Documents and Settings\Jörg\Local Settings\Temporary Internet Files
033 C:\Documents and Settings\Jörg\Cookies
034 C:\Documents and Settings\Jörg\Local Settings\History
035 C:\Documents and Settings\All Users\Application Data
036 C:\WINDOWS
037 C:\WINDOWS\system32
038 C:\Program Files (x86)
039 C:\Documents and Settings\Jörg\My Documents\My Pictures
040 C:\Documents and Settings\Jörg
041 C:\WINDOWS\system32
042 C:\Program Files (x86)
043 C:\Program Files (x86)\Common Files
044 C:\Program Files (x86)\Common Files
045 C:\Documents and Settings\All Users\Templates
046
047 C:\Documents and Settings\All Users\Start Menu\Programs\Administrative Tools
048 C:\Documents and Settings\Jörg\Start Menu\Programs\Administrative Tools
049
050
051
052
053 C:\Documents and Settings\All Users\Documents\My Music
054 C:\Documents and Settings\All Users\Documents\My Pictures
055 C:\Documents and Settings\All Users\Documents\My Videos
056 C:\WINDOWS\Resources
057
058
059 C:\Documents and Settings\Jörg\Local Settings\Application Data\Microsoft\CD Burning
Gruss
EL