Autor Beitrag
Freischaltcode
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 34



BeitragVerfasst: Mi 22.09.04 13:51 
Hi,
(n00b schon wieder)
wie kann ich den Aktuellen Benutzerpfad in Win98/Win 2000/Win 2000Server/Win XP auslesen,
und im Text wiedergeben?

(z.B.: Wenn ich unter XP als Freischaltcode angemeldet bin C:/Dokumente und Einstellungen/Freischaltcode/)

Hoffe ihr könnt mich helfen :o)

MfG
Freischaltcode
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mi 22.09.04 14:19 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
function GetShellFolder(CSIDL: integer): string;
var
  pidl: PItemIdList;
  FolderPath: string;
  SystemFolder: Integer;
begin
  FolderPath := '';
  SystemFolder := CSIDL;
  if SUCCEEDED(SHGetSpecialFolderLocation(0, SystemFolder, pidl)) then
  begin
    SetLength(FolderPath, MAX_PATH);
    SHGetPathFromIDList(pidl, PChar(FolderPath));
    SetLength(FolderPath, lstrlen(PChar(FolderPath)));
  end;
  Result := FolderPath;
end;

Die entsprechenden CSIDL's gibt es hier: msdn.microsoft.com/l...ence/enums/csidl.asp

Moderiert von user profile iconChristian S.: URL-Tags hinzugefügt
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: Mi 22.09.04 14:24 
Hallo und :welcome: hier im Delphi-Forum.de!

Schau bitte vor dem Posten in unsere FAQ-Sparten. Dort befindet sich unter anderem auch dieser Beitrag:

www.delphi-forum.de/...ner+finden_9428.html

Gruß
Tino
Freischaltcode Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 34



BeitragVerfasst: Mi 22.09.04 14:29 
Danköö,
werds gleich mal alles testen ^^