forked from taskscape/WindowLogger
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInstaller.iss
More file actions
79 lines (65 loc) · 3.4 KB
/
Copy pathInstaller.iss
File metadata and controls
79 lines (65 loc) · 3.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
; Installer script for Window Logger
; Requires: Inno Setup 6.x (https://jrsoftware.org/)
#define MyAppName "WindowLogger"
#define MyAppFolderName "WindowLogger"
#define MyAppVersion "1.0"
#define MyAppPublisher "Taskscape"
#define MyAppExeName "WindowLoggerTray.exe"
[Setup]
; Unique AppId (generated for this specific application)
AppId={{E6593582-1594-4177-8332-972134599723}}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppPublisher={#MyAppPublisher}
; Install directly to "Program Files\WindowLogger"
DefaultDirName={autopf}\{#MyAppFolderName}
DefaultGroupName={#MyAppFolderName}
; Require admin privileges (installing to Program Files)
PrivilegesRequired=admin
; Output filename
OutputBaseFilename=WindowLoggerInstaller
Compression=lzma
SolidCompression=yes
WizardStyle=modern
; 64-bit architecture (important for .NET)
ArchitecturesInstallIn64BitMode=x64
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Name: "startup"; Description: "Start Window Logger automatically with Windows (Elevated/Admin)"; GroupDescription: "Startup options";
[Dirs]
; Allow the app to read/write config under ProgramData
Name: "{commonappdata}\{#MyAppFolderName}"; Permissions: users-modify
[Files]
; NOTE: Relative paths assume the .iss file is located next to the .sln file
; 1. Tray Application (Controller)
Source: "WindowLoggerTray\bin\Release\net10.0-windows\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; 2. Window Logger (Background Service)
Source: "WindowLogger\bin\Release\net10.0\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; 3. Analyser (Reports + Config)
; This contains 'appsettings.json', which will be the default configuration
Source: "WindowAnalyser\bin\Release\net10.0\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; Seed ProgramData with the default appsettings.json so the apps can read/write it without manual setup
Source: "WindowAnalyser\bin\Release\net10.0\appsettings.json"; DestDir: "{commonappdata}\{#MyAppFolderName}"; Flags: ignoreversion onlyifdoesntexist
; 4. Config GUI (Editor)
Source: "WindowLoggerConfigGui\bin\Release\net48\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
[Icons]
; Start Menu shortcut
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
; Desktop shortcut
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
[Run]
; 1. Create a Scheduled Task to run the app as Admin on logon (Only if 'startup' task is selected)
; /SC LOGON = Trigger at logon
; /RL HIGHEST = Run with highest privileges (Admin)
; /F = Force create (overwrite if exists)
Filename: "{sys}\schtasks.exe"; \
Parameters: "/Create /F /TN ""{#MyAppName} Autostart"" /TR ""'""{app}\{#MyAppExeName}""'"" /SC LOGON /RL HIGHEST"; \
Flags: runhidden; \
Tasks: startup
; 2. Launch the app immediately after installation
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent runasoriginaluser
[UninstallRun]
; Remove the Scheduled Task when uninstalling
Filename: "{sys}\schtasks.exe"; Parameters: "/Delete /TN ""{#MyAppName} Autostart"" /F"; Flags: runhidden