2016-05-24 23:23:38 +02:00
|
|
|
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
|
|
|
|
2016-11-15 18:17:15 +01:00
|
|
|
<!-- MSI installs on Win7 and above -->
|
|
|
|
<?define MinOSVersionSupported = "VersionNT >= 601" ?>
|
2016-05-24 23:23:38 +02:00
|
|
|
|
|
|
|
<!-- The URL for add/remove programs -->
|
|
|
|
<!-- TBD:Point to the actual release -->
|
|
|
|
<?define InfoURL="https://github.com/PowerShell/PowerShell" ?>
|
|
|
|
|
|
|
|
<?define ProductName = "$(env.ProductName)" ?>
|
|
|
|
<?define ProductGuid = "$(env.ProductGuid)" ?>
|
|
|
|
<?define ProductVersion = "$(env.ProductVersion)" ?>
|
|
|
|
<?define ProductVersionWithName = "$(var.ProductName)_$(var.ProductVersion)"?>
|
2016-11-16 19:32:21 +01:00
|
|
|
<?define ProductTargetArchitecture = "$(env.ProductTargetArchitecture)"?>
|
|
|
|
<?define ProductProgFilesDir = "$(env.ProductProgFilesDir)" ?>
|
2016-05-24 23:23:38 +02:00
|
|
|
|
|
|
|
<!-- Generate Your Own GUID for both ID and UpgradeCode attributes. -->
|
|
|
|
<!-- Note: UpgradeCode GUID MUST REMAIN SAME THROUGHOUT ALL VERSIONS -->
|
2016-11-15 18:17:15 +01:00
|
|
|
<!-- Otherwise, updates won't occur -->
|
2016-06-27 20:39:49 +02:00
|
|
|
<Product Id="$(var.ProductGuid)" Name="$(var.ProductVersionWithName)" Language="1033" Version="$(var.ProductVersion)" Manufacturer="Microsoft Corporation" UpgradeCode="{f7ba3e58-0be8-443b-ac91-f99dd1e7bd3b}">
|
2016-05-24 23:23:38 +02:00
|
|
|
<!-- Properties About The Package -->
|
2016-11-16 19:32:21 +01:00
|
|
|
<Package Id="*" Keywords="Installer" Platform="$(var.ProductTargetArchitecture)" InstallerVersion="200" Compressed="yes" InstallScope="perMachine" Description="PowerShell package" Comments="PowerShell for every system" />
|
2016-06-27 20:39:49 +02:00
|
|
|
|
|
|
|
<!-- Add PowerShell icon for executable -->
|
|
|
|
<Icon Id="PowerShellExe.ico" SourceFile="assets\Powershell_256.ico" />
|
|
|
|
|
|
|
|
<!-- Add PowerShell icon in Add/Remove Programs -->
|
|
|
|
<Property Id="ARPPRODUCTICON" Value="PowerShellExe.ico" />
|
2016-05-24 23:23:38 +02:00
|
|
|
|
|
|
|
<!-- Set properties for add/remove programs -->
|
|
|
|
<Property Id="ARPHELPLINK" Value="$(var.InfoURL)" />
|
|
|
|
|
|
|
|
<!-- Prerequisites -->
|
2016-08-11 22:56:06 +02:00
|
|
|
<Condition Message="Supported only on Win8 and above"><![CDATA[ Installed OR $(var.MinOSVersionSupported) ]]></Condition>
|
2016-05-24 23:23:38 +02:00
|
|
|
|
|
|
|
<!-- Information About When Older Versions Are Trying To Be Installed-->
|
2016-06-27 20:39:49 +02:00
|
|
|
<MajorUpgrade DowngradeErrorMessage="A newer version of PowerShell is already installed." />
|
2016-05-24 23:23:38 +02:00
|
|
|
|
|
|
|
<!-- Embed Cabinet Files in Product-->
|
|
|
|
<MediaTemplate EmbedCab="yes" />
|
|
|
|
|
2016-06-28 01:04:57 +02:00
|
|
|
<!-- In Your Wix Setup Project, Add A Reference To WixUIExtension.dll -->
|
|
|
|
<UIRef Id="WixUI_InstallDir" />
|
2016-05-24 23:23:38 +02:00
|
|
|
|
|
|
|
<!-- Features are mandatory. Need At Least One. -->
|
2016-06-27 20:39:49 +02:00
|
|
|
<Feature Id="ProductFeature" Title="PowerShell" Level="1">
|
2016-05-24 23:23:38 +02:00
|
|
|
<ComponentGroupRef Id="$(var.ProductVersionWithName)"/>
|
|
|
|
<ComponentRef Id="ProductVersionFolder"/>
|
|
|
|
<ComponentRef Id="ApplicationProgramsMenuShortcut"/>
|
|
|
|
</Feature>
|
|
|
|
|
2016-06-28 01:04:57 +02:00
|
|
|
<!--We need to show EULA, and provide option to customize download location-->
|
|
|
|
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" />
|
2016-05-24 23:23:38 +02:00
|
|
|
|
|
|
|
<Directory Id="TARGETDIR" Name="SourceDir">
|
2016-11-16 19:32:21 +01:00
|
|
|
<Directory Id="$(var.ProductProgFilesDir)">
|
2016-06-27 20:39:49 +02:00
|
|
|
<Directory Id="INSTALLFOLDER" Name="PowerShell">
|
2016-05-24 23:23:38 +02:00
|
|
|
<Directory Id="$(var.ProductVersionWithName)" Name="$(var.ProductVersion)">
|
|
|
|
<Component Id="ProductVersionFolder" Guid="{e1a7f05e-0cd6-4227-80a8-e4fb311f045c}">
|
|
|
|
<CreateFolder/>
|
|
|
|
</Component>
|
|
|
|
</Directory>
|
|
|
|
</Directory>
|
|
|
|
</Directory>
|
|
|
|
<Directory Id="ProgramMenuFolder">
|
|
|
|
<Directory Id="ApplicationProgramsFolder" Name="$(var.ProductVersionWithName)">
|
|
|
|
<Component Id="ApplicationProgramsMenuShortcut" Guid="{A77507A7-F970-4618-AC30-20AFE36EE2EB}">
|
2016-06-27 20:39:49 +02:00
|
|
|
<Shortcut Id="PowerShell_ProgramsMenuShortcut"
|
2016-05-24 23:23:38 +02:00
|
|
|
Name="$(var.ProductVersionWithName)"
|
|
|
|
Description="$(var.ProductVersionWithName)"
|
|
|
|
Target="[$(var.ProductVersionWithName)]PowerShell.exe"
|
2016-06-27 20:39:49 +02:00
|
|
|
WorkingDirectory="$(var.ProductVersionWithName)"
|
|
|
|
Icon = "PowerShellExe.ico" />
|
2016-05-24 23:23:38 +02:00
|
|
|
|
|
|
|
<RemoveFolder Id="ApplicationProgramsFolder" On="uninstall"/>
|
|
|
|
|
|
|
|
<RegistryValue Root="HKCU"
|
|
|
|
Key="Software\Microsoft\$(var.ProductVersionWithName)\ProgramsMenuShortcut"
|
|
|
|
Name="installed"
|
|
|
|
Type="integer"
|
|
|
|
Value="1" KeyPath="yes"/>
|
|
|
|
</Component>
|
|
|
|
</Directory>
|
|
|
|
</Directory>
|
|
|
|
</Directory>
|
|
|
|
|
|
|
|
</Product>
|
2016-11-15 18:17:15 +01:00
|
|
|
</Wix>
|