forked from Velocidex/velociraptor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcustom_x86.xml
executable file
·107 lines (104 loc) · 4.64 KB
/
custom_x86.xml
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
99
100
101
102
103
104
105
106
107
<?xml version='1.0' encoding='windows-1252'?>
<?define AppRegKey="Software\Velocidex\Velociraptor" ?>
<?define PackageDescription="Velociraptor Service Installer" ?>
<?define Manufacturer="Velocidex" ?>
<?define Name="Velociraptor" ?>
<?define Version="0.48.0" ?>
<?define BinaryName="Velociraptor.exe" ?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
>
<Product Name='$(var.Name)' Manufacturer='$(var.Manufacturer)'
Id='*'
UpgradeCode='82E586E1-1700-4041-9042-8946BE19B69F'
Language='1033' Codepage='1252' Version='$(var.Version)'>
<Package Id='*' Keywords='Installer' Description="$(var.PackageDescription)"
Comments='$(var.PackageDescription)'
Manufacturer='$(var.Manufacturer)'
InstallerVersion='200' Languages='1033' Compressed='yes'
SummaryCodepage='1252' />
<Media Id='1' Cabinet='Sample.cab' EmbedCab='yes' DiskPrompt='CD-ROM #1' />
<Property Id='DiskPrompt' Value="Installation [1]" />
<Directory Id='TARGETDIR' Name='SourceDir'>
<Directory Id='ProgramFilesFolder' Name='PFiles'>
<Directory Id='INSTALLDIR' Name='$(var.Name)'>
<Directory Id="CACHEDIR" Name="Tools">
<Component Id="Tools" Guid="97dc953a-8a2f-494f-9585-56ae526d0b48">
<CreateFolder />
</Component>
</Directory>
<Component Id='MainExecutable'
Guid='35e9ec26-d243-4fcd-9b5b-6ad37345ccea'>
<File Id='ServiceEXE' Name='$(var.BinaryName)'
DiskId='1'
Source='Output/Velociraptor_x86.exe' KeyPath='yes'>
</File>
<ServiceInstall
Id="ServiceInstaller"
Type="ownProcess"
Vital="yes"
Name="$(var.Name)"
DisplayName="$(var.Name) Service"
Description="$(var.Name) Service"
Start="auto"
Account="LocalSystem"
Arguments=' --config "[INSTALLDIR]/client.config.yaml" service run '
ErrorControl="normal"
Interactive="no">
<util:ServiceConfig
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
FirstFailureActionType='restart'
SecondFailureActionType='restart'
ThirdFailureActionType='restart'
RestartServiceDelayInSeconds='30'
ResetPeriodInDays='0'/>
<!-- This emits warnings but it is necessary
https://github.com/oleg-shilo/wixsharp/issues/299 -->
<ServiceConfig
DelayedAutoStart="yes"
OnInstall="yes"
OnReinstall="yes" />
</ServiceInstall>
<ServiceControl
Id="StartService"
Name="Velociraptor"
Stop="both"
Start="install"
Remove="uninstall" Wait="yes" />
</Component>
<Component Id='Config' Guid='d47dd101-3f53-45ef-889e-2b0db79e554c'>
<File Id='Config' Name='client.config.yaml'
DiskId='1' Source='Output/client.config.yaml' KeyPath='yes'>
</File>
</Component>
</Directory>
</Directory>
</Directory>
<Feature Id='Complete' Level='1'>
<ComponentRef Id='MainExecutable' />
<ComponentRef Id='Config' />
<ComponentRef Id='Tools' />
<ComponentRef Id='CleanupCache' />
</Feature>
<MajorUpgrade DowngradeErrorMessage="Downgrades are not allowed."
Schedule="afterInstallValidate" />
<Property Id="ALLUSERS" Value="1" />
<Property Id="ARPNOREPAIR" Value="1" />
<Property Id="ARPNOMODIFY" Value="1" />
<Property Id="CACHEDIR">
<RegistrySearch Key="$(var.AppRegKey)" Root="HKLM"
Type="raw" Id="CACHEDIR_REGSEARCH" Name="CachePath" />
</Property>
<DirectoryRef Id="CACHEDIR">
<Component Id="CleanupCache" Guid="*">
<RegistryValue Root="HKLM" Key="$(var.AppRegKey)"
Name="CachePath" Type="string"
Value="[CACHEDIR]"
KeyPath="yes" />
<!-- We need to use APPLICATIONFOLDER variable here or RemoveFolderEx
will not remove on "install". But only if WiX 3.6 is used. -->
<util:RemoveFolderEx On="uninstall" Property="CACHEDIR" />
</Component>
</DirectoryRef>
</Product>
</Wix>