salut
j'essai de créer un racourci avec la commande IShellLink
tous va bien mais j'ai quelque chose de tres bizzar , je veut créer un racourci avec un parametre alors le caractère " /" et remplacer par "\" lors de la créeation du raccourci 8O
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 if SHGetSpecialFolderLocation(0, CSIDL_DESKTOPDIRECTORY, IdList)= NOERROR then begin MyDatabasePath :='C:\Documents and Settings\AIT YAHIA IDIR\Bureau\IDIR\'; SHGetPathFromIDList(IdList, Path); ShellLink:=CreateComObject(CLSID_ShellLink) as IShellLink; ShellLink.SetDescription('Microsoft ACCESS créer avec mon prog'); Chemin:=MyPath+'MSACCESS.EXE" "'+MyDatabasePath+'Essai.mdb"/WRKGRP "'+MyDatabasePath+'Sécurisé.mdw'; ShellLink.SetPath(PAnsiChar(Chemin)); ShellLink.SetWorkingDirectory(PAnsiChar(MyDatabasePath)); ShellLink.SetDescription(PAnsiChar('Ouverture d''une table access sécuriser')); ShellLink.SetShowCmd(SW_SHOW); ShortCutPath:= String(Path)+ '\'+ 'Microsoft office Access'+ '.LNK'; (ShellLink as IpersistFile).Save(StringToOleStr(ShortCutPath), true); ShowMEssage('access a été trouvez un racourci a été installer sur votre bureau'); end; end else ShowMEssage('Access n''a pas été trouvez');