desde luego es curioso lo siguiente:
Código Delphi
[-]
procedure TForm1.Button1Click(Sender: TObject);
var
IObject : IUnknown;
ISLink : IShellLink;
IPFile : IPersistFile;
PIDL : PItemIDList;
InFolder : array[0..MAX_PATH] of Char;
TargetName : String;
LinkName : WideString;
Camino, probando: String;
begin
TargetName := 'c:\windows\calc.exe';
IObject := CreateComObject(CLSID_ShellLink) ;
ISLink := IObject as IShellLink;
IPFile := IObject as IPersistFile;
with ISLink do
begin
SetPath(pChar(TargetName)) ;
SetWorkingDirectory(pChar(ExtractFilePath(TargetName))) ;
end;
SHGetSpecialFolderLocation(0, CSIDL_DESKTOPDIRECTORY, PIDL) ;
SHGetPathFromIDList(PIDL, InFolder) ;
SetLength(Camino, MAX_PATH+1);
SHGetSpecialFolderPath(GetActiveWindow(), PChar(Camino), CSIDL_STARTMENU, False);
ShowMessage('El menú inicio está en : ' + Camino);
CreateDirectory(Camino + '\Programas\KK',0);
end;
El showmessage me devuelve bien la ruta pero oh maravilla, el create directory no me crea el puñetero menu