-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRepostConfirmationCancelerX64.iss
More file actions
89 lines (74 loc) · 4.57 KB
/
RepostConfirmationCancelerX64.iss
File metadata and controls
89 lines (74 loc) · 4.57 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
;RepostConfirmationCanceler Setup--
[Setup]
AppName=RepostConfirmationCanceler
AppVerName=RepostConfirmationCanceler
VersionInfoVersion=1.2.3.0
AppVersion=1.2.3.0
AppMutex=RepostConfirmationCancelerSetup
;DefaultDirName=C:\RepostConfirmationCanceler
DefaultDirName={code:GetProgramFiles}\RepostConfirmationCanceler
Compression=lzma2
SolidCompression=yes
OutputDir=SetupOutput
OutputBaseFilename=RepostConfirmationCancelerSetup_x64
AppPublisher=RepostConfirmationCanceler
WizardImageStretch=no
VersionInfoDescription=RepostConfirmationCancelerSetup
ArchitecturesAllowed=x64
ArchitecturesInstallIn64BitMode=x64
DefaultGroupName=RepostConfirmationCanceler
UninstallDisplayIcon={app}\RepostConfirmationCanceler.exe
[Registry]
Root: HKLM; Subkey: "Software\RepostConfirmationCanceler"; Flags: uninsdeletekey
Root: HKLM; Subkey: "Software\RepostConfirmationCanceler"; ValueType: string; ValueName: "Path"; ValueData: "{app}\"
Root: HKLM; Subkey: "Software\RepostConfirmationCanceler"; ValueType: string; ValueName: "ClientType"; ValueData: ""
Root: HKLM; Subkey: "Software\RepostConfirmationCanceler"; ValueType: string; ValueName: "Version"; ValueData: "1.2.3.0"
Root: HKLM; Subkey: "Software\RepostConfirmationCanceler"; ValueType: string; ValueName: "Rulefile"; ValueData: "{app}\RepostConfirmationCanceler.ini"
Root: HKLM; Subkey: "Software\RepostConfirmationCanceler"; ValueType: string; ValueName: "RCAPfile"; ValueData: "{app}\ResourceCap.ini"
Root: HKLM; Subkey: "Software\RepostConfirmationCanceler"; ValueType: string; ValueName: "ExtensionExecfile"; ValueData: "{app}\RepostConfirmationCanceler.exe"
Root: HKLM; Subkey: "Software\WOW6432Node\RepostConfirmationCanceler"; Flags: uninsdeletekey
Root: HKLM; Subkey: "Software\WOW6432Node\RepostConfirmationCanceler"; ValueType: string; ValueName: "Path"; ValueData: "{app}\"
Root: HKLM; Subkey: "Software\WOW6432Node\RepostConfirmationCanceler"; ValueType: string; ValueName: "ClientType"; ValueData: ""
Root: HKLM; Subkey: "Software\WOW6432Node\RepostConfirmationCanceler"; ValueType: string; ValueName: "Version"; ValueData: "1.2.3.0"
Root: HKLM; Subkey: "Software\WOW6432Node\RepostConfirmationCanceler"; ValueType: string; ValueName: "Rulefile"; ValueData: "{app}\RepostConfirmationCanceler.ini"
Root: HKLM; Subkey: "Software\WOW6432Node\RepostConfirmationCanceler"; ValueType: string; ValueName: "RCAPfile"; ValueData: "{app}\ResourceCap.ini"
Root: HKLM; Subkey: "Software\WOW6432Node\RepostConfirmationCanceler"; ValueType: string; ValueName: "ExtensionExecfile"; ValueData: "{app}\RepostConfirmationCanceler.exe"
;Edge
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Edge\NativeMessagingHosts\com.clear_code.repost_confirmation_canceler"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Edge\NativeMessagingHosts\com.clear_code.repost_confirmation_canceler"; ValueType: string; ValueData: "{app}\RepostConfirmationCancelerHost\edge.json";
[Languages]
Name: jp; MessagesFile: "compiler:Languages\Japanese.isl"
[Files]
;exe
Source: "bin\Release\RepostConfirmationCanceler.exe"; DestDir: "{app}\";Flags: ignoreversion;permissions:users-readexec admins-full system-full
;ini
Source: "Resources\RepostConfirmationCanceler.ini"; DestDir: "{app}"; Flags: onlyifdoesntexist
;host
Source: "bin\x64\Release\RepostConfirmationCancelerTalk.exe"; DestDir: "{app}\RepostConfirmationCancelerHost";Flags: ignoreversion;permissions:users-readexec admins-full system-full
;edge
Source: "Resources\edge.json"; DestDir: "{app}\RepostConfirmationCancelerHost";Flags: ignoreversion;permissions:users-readexec admins-full system-full
[Dirs]
Name: "{app}";Permissions: users-modify
[Run]
Filename: "{sys}\icacls.exe";Parameters: """{app}\RepostConfirmationCanceler.exe"" /inheritance:r"; Flags: runhidden shellexec
Filename: "{sys}\icacls.exe";Parameters: """{app}\RepostConfirmationCancelerHost\RepostConfirmationCancelerTalk.exe"" /inheritance:r"; Flags: runhidden shellexec
Filename: "{sys}\icacls.exe";Parameters: """{app}\RepostConfirmationCancelerHost\edge.json"" /inheritance:r"; Flags: runhidden shellexec
[UninstallRun]
[Code]
function GetProgramFiles(Param: string): string;
begin
if IsWin64 then Result := ExpandConstant('{pf64}')
else Result := ExpandConstant('{pf32}')
end;
procedure TaskKill(FileName: String);
var
ResultCode: Integer;
begin
Exec(ExpandConstant('taskkill.exe'), '/f /im ' + '"' + FileName + '"', '', SW_HIDE,ewWaitUntilTerminated, ResultCode);
end;
function InitializeSetup():Boolean;
begin
TaskKill('msedge.exe');
TaskKill('RepostConfirmationCanceler.exe');
Result := True;
end;