【Inno Setup】Inno Setup Scripts(*.iss)ファイルテンプレート

Inno Setupの記述サンプルです。
以下の例では、EXEとReadme.txtがインストーラに含まれます。
実際のパス、アプリ名称などを修正して利用してください。

尚、必ず[Setup]のAppIdは、Inno Setup Compilerのメニューから、Tools→Generate GUIDをクリックして出力された値に書き換えてから利用してください。

; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
; Compiler Version 5.5.3(a)

#define MyAppName "アプリ名"
#define MyAppVersion "1.00"
#define MyAppPublisher "hoge-hoge"
#define MyAppURL "https://hoge.hoge/"
#define MyAppExeName "hoge.exe"

[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{95178216-BEFD-4EB7-B98B-C75CEC7E495B}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}{#MyAppName}
DefaultGroupName={#MyAppName}
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes

[Languages]
Name: "japanese"; MessagesFile: "compiler:LanguagesJapanese.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked

[Files]
Source: "C:アプリhoge.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:アプリReadme.txt"; DestDir: "{app}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Name: "{group}{#MyAppName}"; Filename: "{app}{#MyAppExeName}"
Name: "{commondesktop}{#MyAppName}"; Filename: "{app}{#MyAppExeName}"; Tasks: desktopicon

[Run]
Filename: "{app}{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent