-
Notifications
You must be signed in to change notification settings - Fork 22
/
installer.iss
48 lines (39 loc) · 1.93 KB
/
installer.iss
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
[Setup]
AppID=WinIPBroadcast
AppName=WinIPBroadcast
AppVerName=WinIPBroadcast 1.6
AppVersion=1.6
AppPublisher=Etienne Dechamps
AppPublisherURL=https://github.com/dechamps/WinIPBroadcast
AppSupportURL=https://github.com/dechamps/WinIPBroadcast
AppUpdatesURL=https://github.com/dechamps/WinIPBroadcast
OutputDir=.
OutputBaseFilename=WinIPBroadcast-1.6
DefaultDirName={pf}\WinIPBroadcast
AppendDefaultDirName=no
LicenseFile=LICENSE.txt
[Files]
Source:"Release\WinIPBroadcast.exe"; DestDir: "{app}"; Flags: ignoreversion; BeforeInstall: StopService
Source:"WinIPBroadcast.c"; DestDir:"{app}\src"; Flags: ignoreversion
Source:"WinIPBroadcast.sln"; DestDir:"{app}\src"; Flags: ignoreversion
Source:"WinIPBroadcast.vcxproj"; DestDir:"{app}\src"; Flags: ignoreversion
Source:"LICENSE.txt"; DestDir:"{app}"; Flags: ignoreversion
Source:"README.md"; DestDir:"{app}"; DestName:"README.txt"; Flags: ignoreversion isreadme
[Registry]
Root: HKLM; Subkey: "SOFTWARE\WinIPBroadcast"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\WinIPBroadcast"; ValueType: string; ValueName: "InstallDir"; ValueData: "{app}"; Flags: deletevalue
Root: HKLM; Subkey: "SOFTWARE\WinIPBroadcast"; ValueType: string; ValueName: "Version"; ValueData: "1.6"; Flags: deletevalue
[Run]
Filename: "{app}\WinIPBroadcast.exe"; Parameters: "install"; StatusMsg: "Installing service..."; Flags: runhidden
Filename: "{sys}\net.exe"; Parameters: "start WinIPBroadcast"; StatusMsg: "Starting service..."; Flags: runhidden
[UninstallRun]
Filename: "{sys}\net.exe"; Parameters: "stop WinIPBroadcast"; Flags: runhidden; RunOnceId: "StopService"
Filename: "{app}\WinIPBroadcast.exe"; Parameters: "remove"; Flags: runhidden; RunOnceId: "RemoveService"
[code]
procedure StopService();
var
ResultCode : Integer;
begin
Exec(ExpandConstant('{sys}') + '\net.exe', 'stop WinIPBroadcast', '', SW_HIDE, ewWaitUntilTerminated, ResultCode);
end;