Hola,
Tienes que procurar la ruta del menú de inicio del usuario "en sesión", o la ruta del menú de inicio para "todos los usuarios". Dentro de alguno de esos directorios has de situar las carpetas y accesos directos que consideres necesarios. Adjunto código fuente para obtener la ruta de los dos directorios mencionados.
Código Delphi
[-]
unit USpecialFolder;
interface
uses
Windows;
const
CSIDL_STARTMENU = $000b;
CSIDL_COMMON_STARTMENU = $0016;
function GetSpecialFolder(csidl: integer): string;
function SHGetSpecialFolderPath(Handle: HWND; Path:
PChar; Folder: Integer; Create: Bool): BOOL; stdcall;
implementation
uses
SysUtils;
function SHGetSpecialFolderPath; external
'Shell32.dll' Name 'SHGetSpecialFolderPathA';
function GetSpecialFolder(csidl: integer): string;
var
buffer: array[0..MAX_PATH] of char;
begin
result := EmptyStr;
if SHGetSpecialFolderPath(GetActiveWindow(),buffer,csidl,false) = true then
result := IncludeTrailingPathDelimiter(buffer);
end;
end.
Con esta otra función puedes crear un acceso directo a una carpeta o archivo:
Código Delphi
[-]
uses
ShlObj, ActiveX, ComObj;
function AccesoDirecto(nombre, descripcion, directorio,
rutaArchivo, argumentos: string): boolean;
resourcestring
rsExtLnk = '.lnk';
var
IObject: IUnknown;
ISLink: IShellLink;
IPFile: IPersistFile;
nombreAcceso: WideString;
begin
IObject := CreateComObject(CLSID_ShellLink);
ISLink := (IObject as IShellLink);
IPFile := (IObject as IPersistFile);
with ISLink do begin
SetShowCmd(SW_SHOWNORMAL);
SetPath(PChar(rutaArchivo));
SetArguments(PChar(argumentos));
SetDescription(PChar(descripcion));
SetWorkingDirectory(PChar(ExtractFilePath(rutaArchivo)));
end;
directorio := IncludeTrailingPathDelimiter(directorio);
nombreAcceso := directorio+nombre+rsExtLnk;
result := (IPFile.Save(PWChar(nombreAcceso), false) = S_OK);
end;