RESPUESTA A LA PREGUNTA 1994 unit Accdirec; interface uses Windows, Classes, ComObj,shlobj,activex; type TAccdirec = class(TComponent) private exe1 : string; arg1 : string; dt1 : string; no1 : string; dd1 : string ; ico1 : string ; dede1 : string ; { Private declarations } protected { Protected declarations } public procedure executar; constructor create(Aowner:Tcomponent); override; { Public declarations } published property ejecutable : string read exe1 write exe1; property argumentos : string read arg1 write arg1; property Directorio_trabajo : string read dt1 write dt1; property Nombre_enlace : string read no1 write no1; property Directorio_destino : string read dd1 write dd1; property icono : string read ico1 write ico1; property Dedicado : string read dede1 ; { Published declarations } end; procedure Register; implementation procedure Register; begin RegisterComponents('Samples', [TAccdirec]); end; constructor TAccdirec.create(Aowner:Tcomponent); begin inherited Create(Aowner); dede1:='CHARDI'; end; procedure TAccdirec.executar; var Objeto: IUnknown; UnSlink: IShellLink; FicheroP: IPersistFile; WFichero: WideString; begin Objeto := CreateComObject(CLSID_ShellLink); UnSlink := Objeto as IShellLink; FicheroP := Objeto as IPersistFile; with UnSlink do begin SetArguments( PChar(arg1) ); SetPath( PChar(Exe1) ); SetWorkingDirectory( PChar(Dt1) ); SetIconLocation(PChar(ico1),0 ); end; WFichero := dd1 + '\' + no1 + '.lnk'; FicheroP.Save(PWChar(WFichero),False); end; end. Rafa Chardi rafa.chardi@clase10.com