Hallo,
ob das Funkt weiß ich nicht, da ich im Moment nur XP-Home habe, aber einen Versuch ist es Wert:
Delphi-Quellcode:
PROCEDURE TForm1.Button1Click(Sender: TObject);
FUNCTION StartUpPath: STRING;
VAR
FilePath : ARRAY[0..MAX_PATH] OF Char;
IDL : PItemIDList;
BEGIN
Result := '';
IF Succeeded(SHGetSpecialFolderLocation(0, CSIDL_STARTUP, IDL)) THEN
IF SHGetPathFromIDList(IDL, FilePath) THEN
Result := FilePath;
END;
BEGIN
showmessage(StartUpPath);
END;
MSDN:
Zitat:
...
SHGetSpecialFolderLocation Function
Function Information
Minimum
DLL Version shell32.dll version
4.0 or later
Custom Implementation No
Header shlobj.h
Import library shell32.lib
Minimum operating systems Windows NT 4.0, Windows 95