summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFyodor Sheremetyev <sheremetyev@gmail.com>2013-03-15 16:52:53 +0000
committerFyodor Sheremetyev <sheremetyev@gmail.com>2013-03-15 16:52:53 +0000
commitef40aa9393729c305b13233be1830a9da1a0de39 (patch)
tree323ac3fba2fb7585e3075fa25c227cc34eab3ecf
parent6269ba03b056ad933110c1a081daab96db18997b (diff)
WiX: Update system PATH environment variable when installing per-machine.
Had to create two separate components because System property of Environment element cannot be set on condition.
-rw-r--r--windows/pandoc.wxs23
1 files changed, 21 insertions, 2 deletions
diff --git a/windows/pandoc.wxs b/windows/pandoc.wxs
index cee663962..9ca4b463c 100644
--- a/windows/pandoc.wxs
+++ b/windows/pandoc.wxs
@@ -48,9 +48,26 @@
Source="..\COPYRIGHT.txt" />
<File Id="pandocCOPYING" Name="COPYING.rtf"
Source="..\COPYING.rtf" />
- <Environment Id="UpdatePath" Name="PATH" Action="set"
- Part="last" Value="[APPLICATIONFOLDER]" />
</Component>
+
+ <Component Id="UpdatePathUser"
+ Guid="C7B71304-09FC-421D-9EA2-AEFB7D61759D">
+ <Condition><![CDATA[ ALLUSERS="" OR (ALLUSERS=2 AND (NOT Privileged)) ]]></Condition>
+ <Environment Id="UpdatePathUser" Name="PATH" Action="set"
+ Part="last" Value="[APPLICATIONFOLDER]" System="no" />
+ <RegistryValue Root="HKCU" Key="Software\John MacFarlane\Pandoc"
+ Name="UserPathUpdated" Type="integer" Value="1" KeyPath="yes"/>
+ </Component>
+
+ <Component Id="UpdatePathMachine"
+ Guid="0C642D0A-7175-4CD7-B11F-0A69F73FD757">
+ <Condition><![CDATA[ ALLUSERS=1 OR (ALLUSERS=2 AND Privileged) ]]></Condition>
+ <Environment Id="UpdatePathMachine" Name="PATH" Action="set"
+ Part="last" Value="[APPLICATIONFOLDER]" System="yes" />
+ <RegistryValue Root="HKLM" Key="Software\John MacFarlane\Pandoc"
+ Name="SystemPathUpdated" Type="integer" Value="1" KeyPath="yes"/>
+ </Component>
+
<Component Id="Documentation"
Guid="A8D54A76-1A3D-4647-8327-81B69D39D8A3">
<File Id="pandocREADME" Name="Pandoc User's Guide.html"
@@ -77,6 +94,8 @@
<Feature Id="Complete" Level="1" Title="Pandoc $(var.VERSION)" Description="Complete package" Display="expand" ConfigurableDirectory="APPLICATIONFOLDER">
<Feature Id="MainProgram" Title="Program" Description="The main executable." Level="1">
<ComponentRef Id="MainExecutable" />
+ <ComponentRef Id="UpdatePathUser" />
+ <ComponentRef Id="UpdatePathMachine" />
</Feature>
<Feature Id="Manual" Title="Manual">
<ComponentRef Id="Documentation" />