Repository navigation
Expand file tree
/
Copy pathsetup.iss
More file actions
98 lines (85 loc) · 4 KB
/
Copy pathsetup.iss
File metadata and controls
98 lines (85 loc) · 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
; Inno Setup Script for RemoteRun v1.0.7
; Run programs as NT AUTHORITY\SYSTEM locally or on remote machines.
;
; Build RemoteRun first (for each architecture):
; dotnet publish RemoteRun\RemoteRun.csproj -c Release -r win-x64 --self-contained true -o .\publish\windows-latest-x64\RemoteRun
; dotnet publish RemoteRun\RemoteRun.csproj -c Release -r win-x86 --self-contained true -o .\publish\windows-latest-x86\RemoteRun
; Then compile this script with Inno Setup Compiler, passing the target architecture:
; ISCC.exe /DMyAppArch=x64 setup.iss
; ISCC.exe /DMyAppArch=x86 setup.iss
; Default to x64 if not specified on the command line (/DMyAppArch=x86 to override)
#ifndef MyAppArch
#define MyAppArch "x64"
#endif
#define MyAppName "RemoteRun"
#define MyAppVersion "1.0.7"
#define MyAppPublisher "LoveDoLove"
#define MyAppURL "https://github.com/LoveDoLove/AdvancedRun-Rework"
#define MyAppExeName "RemoteRun.exe"
#define MyAppSourceDir "publish\windows-latest-" + MyAppArch + "\RemoteRun"
[Setup]
; Unique installer identity for RemoteRun
AppId={{F3C4B2A1-D5E6-4F7A-8B9C-0D1E2F3A4B5C}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={autopf}\{#MyAppName}
DefaultGroupName={#MyAppName}
AllowNoIcons=yes
; RemoteRun requires Administrator; reflect that in the installer too
PrivilegesRequired=admin
; We modify PATH so that "remoterun" can be run from any console
ChangesEnvironment=yes
; Output Settings
OutputDir=Output
OutputBaseFilename=RemoteRun_Setup_{#MyAppArch}
Compression=lzma
SolidCompression=yes
WizardStyle=modern
SetupIconFile=images\logo.ico
#if MyAppArch == "x64"
; x64 installer: restrict to 64-bit systems and install in 64-bit Program Files
ArchitecturesAllowed=x64
ArchitecturesInstallIn64BitMode=x64
#endif
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
; Optional desktop shortcut
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
; All published files (exe, DLLs, runtime libraries, etc.) from the dotnet publish output directory
Source: "{#MyAppSourceDir}\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; Documentation
Source: "RemoteRun\README.md"; DestDir: "{app}"; Flags: ignoreversion isreadme
; License
Source: "LICENSE"; DestDir: "{app}"; Flags: ignoreversion
[Icons]
; ── Start Menu ──────────────────────────────────────────────────────────────
; Main RemoteRun shortcut
Name: "{group}\RemoteRun"; Filename: "{app}\RemoteRun.exe"; \
Comment: "Run programs as NT AUTHORITY\SYSTEM"
; "System CMD" – appears in Windows Search / Start Menu search.
; Typing "System CMD" and pressing Enter opens an interactive SYSTEM
; command prompt without having to open an admin terminal manually.
Name: "{group}\System CMD"; Filename: "{app}\RemoteRun.exe"; \
Parameters: "cmd.exe"; \
Comment: "Open an interactive NT AUTHORITY\SYSTEM command prompt"
; Uninstall shortcut
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
; ── Desktop (optional task) ───────────────────────────────────────────────
Name: "{autodesktop}\RemoteRun"; Filename: "{app}\RemoteRun.exe"; \
Tasks: desktopicon; \
Comment: "Run programs as NT AUTHORITY\SYSTEM"
[Registry]
; Add installation directory to the system PATH so "remoterun" works everywhere
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; \
ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app}"; \
Flags: preservestringtype
[Run]
; After installation the user can immediately open a SYSTEM command prompt.
Filename: "{app}\RemoteRun.exe"; Parameters: "cmd.exe"; \
Description: "Open a SYSTEM command prompt now";