prog:inno_setup
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
| prog:inno_setup [2016/11/15 16:49] – Création avec "Modifier un fichier après installation" root | prog:inno_setup [2022/02/11 21:56] (Version actuelle) – Mise à jour v6.2.0 root | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| - | [[http:// | + | [[http:// |
| =====Modifier un fichier après installation===== | =====Modifier un fichier après installation===== | ||
| Ligne 6: | Ligne 6: | ||
| Ajouter après chaque fichier une directive '' | Ajouter après chaque fichier une directive '' | ||
| - | '' | + | '' |
| '' | '' | ||
| Ligne 12: | Ligne 12: | ||
| <code pascal> | <code pascal> | ||
| procedure FileReplaceString(const FileName: string); | procedure FileReplaceString(const FileName: string); | ||
| - | var | + | va |
| MyFile : TStrings; | MyFile : TStrings; | ||
| MyText : string; | MyText : string; | ||
| Ligne 31: | Ligne 31: | ||
| end; | end; | ||
| </ | </ | ||
| + | |||
| + | =====Modification de la base de registre===== | ||
| + | Ici, pour lancer le programme en mode administrateur. | ||
| + | < | ||
| + | [Registry] | ||
| + | ; Pour forcer l' | ||
| + | Root: HKLM; Subkey: " | ||
| + | </ | ||
| + | |||
| + | =====Création d'un raccourci===== | ||
| + | [[https:// | ||
| + | |||
| + | <code pascal> | ||
| + | const | ||
| + | CLSID_ShellLink = ' | ||
| + | |||
| + | type | ||
| + | IShellLinkW = interface(IUnknown) | ||
| + | ' | ||
| + | procedure Dummy; | ||
| + | procedure Dummy2; | ||
| + | procedure Dummy3; | ||
| + | function GetDescription(pszName: | ||
| + | function SetDescription(pszName: | ||
| + | function GetWorkingDirectory(pszDir: | ||
| + | function SetWorkingDirectory(pszDir: | ||
| + | function GetArguments(pszArgs: | ||
| + | function SetArguments(pszArgs: | ||
| + | function GetHotkey(var pwHotkey: Word): HResult; | ||
| + | function SetHotkey(wHotkey: | ||
| + | function GetShowCmd(out piShowCmd: Integer): HResult; | ||
| + | function SetShowCmd(iShowCmd: | ||
| + | function GetIconLocation(pszIconPath: | ||
| + | out piIcon: Integer): HResult; | ||
| + | function SetIconLocation(pszIconPath: | ||
| + | function SetRelativePath(pszPathRel: | ||
| + | function Resolve(Wnd: | ||
| + | function SetPath(pszFile: | ||
| + | end; | ||
| + | |||
| + | IPersist = interface(IUnknown) | ||
| + | ' | ||
| + | function GetClassID(var classID: TGUID): HResult; | ||
| + | end; | ||
| + | |||
| + | IPersistFile = interface(IPersist) | ||
| + | ' | ||
| + | function IsDirty: HResult; | ||
| + | function Load(pszFileName: | ||
| + | function Save(pszFileName: | ||
| + | function SaveCompleted(pszFileName: | ||
| + | function GetCurFile(out pszFileName: | ||
| + | end; | ||
| + | |||
| + | procedure CreateShortCut(const FileName: string; const argument: string; const destination: | ||
| + | var | ||
| + | Obj: IUnknown; | ||
| + | SL: IShellLinkW; | ||
| + | PF: IPersistFile; | ||
| + | begin | ||
| + | if IsTaskSelected(' | ||
| + | begin | ||
| + | { Create the main ShellLink COM Automation object } | ||
| + | Obj := CreateComObject(StringToGuid(CLSID_ShellLink)); | ||
| + | |||
| + | { Set the shortcut properties } | ||
| + | SL := IShellLinkW(Obj); | ||
| + | OleCheck(SL.SetPath(ExpandConstant(' | ||
| + | OleCheck(SL.SetArguments(argument)); | ||
| + | OleCheck(SL.SetShowCmd(SW_SHOWNORMAL)); | ||
| + | |||
| + | { Save the shortcut } | ||
| + | PF := IPersistFile(Obj); | ||
| + | OleCheck(PF.Save(ExpandConstant(' | ||
| + | end; | ||
| + | end; | ||
| + | </ | ||
| + | |||
| + | Exemple d' | ||
| + | AfterInstall: | ||
prog/inno_setup.1479224994.txt.gz · Dernière modification : de root
