Skip to content

Commit d19bac8

Browse files
committed
msi: change log directory for persistent connections
Since OpenVPN service user doesn´t have write access to %PROGRAMFILES%, change log dir to C:\ProgramData\OpenVPN\Log GitHub: #844 Signed-off-by: Lev Stipakov <lev@openvpn.net>
1 parent 8dc0434 commit d19bac8

File tree

1 file changed

+10
-38
lines changed

1 file changed

+10
-38
lines changed

windows-msi/msi.wxs

Lines changed: 10 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -309,38 +309,6 @@
309309
Value="[EASYRSA]"
310310
Sequence="first">EASYRSA AND NOT Installed</SetProperty>
311311

312-
313-
<!--
314-
1. Set log folder with registry folder if detected.
315-
2. Set log folder to the previous log folder if detected. Use README.txt file to detect previous log folder.
316-
3. Allow overriding log folder by specifying LOG=<folder> on the msiexec.exe command line.
317-
-->
318-
<Property Id="LOGDIRREG">
319-
<RegistrySearch Id="reg.log_dir" Root="HKLM" Key="SOFTWARE\$(var.PRODUCT_NAME)" Name="log_dir" Type="directory"/>
320-
</Property>
321-
<SetProperty
322-
After="AppSearch"
323-
Action="SetLogDirReg"
324-
Id="LOGDIR"
325-
Value="[LOGDIRREG]"
326-
Sequence="first">LOGDIRREG AND NOT Installed</SetProperty>
327-
<Property Id="LOGDIRPREV">
328-
<ComponentSearch Id="log.README.txt" Guid="{CD05C1F7-99E7-45C9-8DE5-9C7FB73EE911}"/>
329-
</Property>
330-
<SetProperty
331-
After="SetLogDirReg"
332-
Action="SetLogDirPrev"
333-
Id="LOGDIR"
334-
Value="[LOGDIRPREV]"
335-
Sequence="first">LOGDIRPREV AND NOT Installed</SetProperty>
336-
<SetProperty
337-
After="SetLogDirPrev"
338-
Action="SetLogDirParam"
339-
Id="LOGDIR"
340-
Value="[LOG]"
341-
Sequence="first">LOG AND NOT Installed</SetProperty>
342-
343-
344312
<!--
345313
1. Set sample configuration folder to the previous sample configuration folder if detected. Use sample.ovpn file to detect previous sample configuration folder.
346314
2. Allow overriding sample configuration folder by specifying SAMPLECFG=<folder> on the msiexec.exe command line.
@@ -671,12 +639,6 @@
671639
</Directory>
672640
</Directory>
673641

674-
<Directory Id="LOGDIR" Name="log">
675-
<Component Id="log.README.txt" Guid="{CD05C1F7-99E7-45C9-8DE5-9C7FB73EE911}">
676-
<File Id="log.README.txt" Name="README.txt" Source="!(bindpath.build)README-log.txt"/>
677-
</Component>
678-
</Directory>
679-
680642
<Directory Id="RESDIR" Name="res">
681643
<Component Id="res.ovpn.ico" Guid="{01C7FEE2-2F5B-4BBF-A7CF-7B7B5E2B44D2}">
682644
<File Id="res.ovpn.ico" Name="ovpn.ico" Source="artwork\ovpn.ico"/>
@@ -702,6 +664,16 @@
702664
</Directory>
703665
</Directory>
704666

667+
<Directory Id="CommonAppDataFolder">
668+
<Directory Id="ProgramDataFolder.OpenVPN" Name="$(var.PRODUCT_NAME)">
669+
<Directory Id="LOGDIR" Name="Log">
670+
<Component Id="log.README.txt" Guid="{CD05C1F7-99E7-45C9-8DE5-9C7FB73EE911}">
671+
<File Id="log.README.txt" Name="README.txt" Source="!(bindpath.build)README-log.txt"/>
672+
</Component>
673+
</Directory>
674+
</Directory>
675+
</Directory>
676+
705677
<Directory Id="ProgramMenuFolder">
706678
<Directory Id="ProductShortcutFolder" Name="$(var.PRODUCT_NAME)">
707679
<Component Id="shortcut.openvpn_gui.exe" Guid="{EC5742CF-E221-497C-A411-6CF74A298612}">

0 commit comments

Comments
 (0)