This function used to get start menu directory.
uses shlobj;
function GetStartMenu: String;
var
dir: PItemIDList;
startmenu : array[0..MAX_PATH] of Char;
begin
SHGetSpecialFolderLocation(Application.handle, CSIDL_STARTMENU, dir);
SHGetPathFromIDList(dir, startmenu);
result := strpas(startmenu);
end;
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
Edit1.Text := GetStartMenu;
end;
Download: Source Code
|