Browse Source

Add Custom Actions (Installer) (#19041)

(cherry picked from commit 8c6eb51ceb54ddff9aa6fb803a2125338b621e43)
thiagoftsm 2 days ago
parent
commit
28ba5a4591
1 changed files with 10 additions and 0 deletions
  1. 10 0
      packaging/windows/netdata.wxs.in

+ 10 - 0
packaging/windows/netdata.wxs.in

@@ -104,6 +104,16 @@
                 </File>
             </ComponentGroup>
 
+            <CustomAction Id="DllPermission" Directory="System64Folder" ExeCommand='[System64Folder]icacls.exe &quot;[System64Folder]wevt_netdata.dll&quot; /grant &quot;NT SERVICE\EventLog&quot;:R' Execute="deferred" Return="ignore" Impersonate="no"/>
+            <InstallExecuteSequence>
+                <Custom Action="DllPermission" After="InstallFiles" />
+            </InstallExecuteSequence>
+
+            <CustomAction Id="InstallManifest" Directory="System64Folder" ExeCommand='[System64Folder]wevtutil.exe im &quot;[System64Folder]wevt_netdata_manifest.xml&quot; &quot;/mf:[System64Folder]\wevt_netdata.dll&quot; &quot;/rf:[System64Folder]\wevt_netdata.dll&quot;' Execute="deferred" Return="ignore" Impersonate="no"/>
+            <InstallExecuteSequence>
+                <Custom Action="InstallManifest" After="InstallFiles" />
+            </InstallExecuteSequence>
+
             <Component Id="NetdataService" Directory="USRBINDIR">
                 <File Id="netdata.exe" Source="C:\msys64\opt\netdata\usr\bin\netdata.exe" KeyPath="yes" />