forked from Azure/azure-powershell
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathazurecmd.wxs
More file actions
112 lines (93 loc) · 5.42 KB
/
azurecmd.wxs
File metadata and controls
112 lines (93 loc) · 5.42 KB
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
108
109
110
111
112
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<?define productName="Microsoft Azure PowerShell - September 2015" ?>
<?define sourceDir="$(var.SolutionDir)..\src\Package\$(var.Configuration)" ?>
<?define caSourceDir="$(var.SolutionDir)setup\bin\$(var.Configuration)" ?>
<?define version="0.9.9" ?>
<?define versionedStartMenuFolder="Microsoft Azure" ?>
<?define staleStartMenuFolder="Windows Azure" ?>
<Product Id="*"
Name="$(var.productName)"
Language="1033"
Version="$(var.version)"
Manufacturer="Microsoft Corporation"
UpgradeCode="EBC1AD5E-1BBE-45B5-9E8D-ACFC8951C252">
<Package InstallerVersion="200" Compressed="yes" Platform="x86" />
<Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />
<MajorUpgrade AllowSameVersionUpgrades="yes"
DowngradeErrorMessage="A later version of Microsoft Azure PowerShell is already installed. Setup will now exit." />
<Icon Id="icon.ico" SourceFile="media\WAIcon.ico"/>
<Property Id="ARPPRODUCTICON" Value="icon.ico" />
<Property Id="ALLUSERS" Value="1" />
<!-- per machine install-->
<Property Id="PSCOMPATIBLEVERSION">
<RegistrySearch Id="PSCOMPATIBLEVERSION" Root="HKLM" Key="SOFTWARE\Microsoft\PowerShell\3\PowerShellEngine" Name="PSCompatibleVersion" Type="raw" />
</Property>
<Condition Message="This setup requires the Windows PowerShell 3.0 or compatible version to be installed.">
<!-- This condition will break if PowerShell has version x3.0 and it is not compatible with 3.0 -->
<![CDATA[Installed or (PSCOMPATIBLEVERSION >< "3.0")]]>
</Condition>
<PropertyRef Id="NETFRAMEWORK40FULL" />
<PropertyRef Id="NETFRAMEWORK40CLIENT" />
<Condition Message="This setup requires the .NET Framework 4.0 or higher to be installed.">
Installed OR NETFRAMEWORK40FULL OR NETFRAMEWORK40CLIENT
</Condition>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="MicrosoftSdkFolder" Name="Microsoft SDKs">
<Directory Id="AzureSdkFolder" Name="Azure">
<Directory Id="PowerShellFolder" Name="PowerShell"/>
</Directory>
</Directory>
</Directory>
<Directory Id="ProgramMenuFolder">
<Directory Id="AzureSdkMenu" Name="$(var.versionedStartMenuFolder)"/>
<Directory Id="StaleAzureSdkMenu" Name="$(var.staleStartMenuFolder)"/>
</Directory>
</Directory>
<Property Id="POWERSHELLPATH">
<RegistrySearch Id="POWERSHELLPATH"
Type="raw"
Root="HKLM"
Key="SOFTWARE\Microsoft\PowerShell\3\PowerShellEngine"
Name="ApplicationBase" />
</Property>
<DirectoryRef Id="PowerShellFolder">
<Component Id="PSModulePath.System" Guid="273525B9-7AAB-421A-90C8-8E50A1840B8D">
<CreateFolder />
<!-- Work around bug that PowerShell does not always consider default module paths. -->
<Environment Id="PSModulePath.SystemAppRoot" Action="set" Name="PSMODULEPATH" Part="last" Value="$(var.PlatformProgramFilesFolder)\WindowsPowerShell\Modules;[PowerShellFolder]ResourceManager;[PowerShellFolder]ServiceManagement" System="yes" />
</Component>
</DirectoryRef>
<DirectoryRef Id="AzureSdkMenu">
<Component Id="AzureSdkShortcut" Guid="A9B58A22-F746-451D-8840-F887D8014C3C">
<Shortcut Id="AzureSdkStartMenuShortcut"
Name="Microsoft Azure PowerShell"
Description="Microsoft PowerShell cmdlets"
Target="[POWERSHELLPATH]\powershell.exe"
Arguments="-NoExit -ExecutionPolicy Bypass -File "[PowerShellFolder]ServiceManagement\Azure\Services\ShortcutStartup.ps1""/>
<RemoveFolder Id="AzureSdkMenu" On="uninstall"/>
<RemoveFile Id="RemoveStaleFiles" Directory="StaleAzureSdkMenu" Name="Windows Azure PowerShell.lnk" On="both"/>
<RegistryValue Root="HKCU" Key="SOFTWARE\Microsoft\Microsoft SDKs\WindowsAzure\$(var.version)" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
</Component>
</DirectoryRef>
<Feature Id="azurecmd" Title="Microsoft Azure PowerShell" Level="1" Description="Windows PowerShell commandlets">
<ComponentGroupRef Id="azurecmdfiles" />
<ComponentRef Id="PSModulePath.System" />
<ComponentRef Id="AzureSdkShortcut" />
</Feature>
<Binary Id="CustomActions" SourceFile="$(var.caSourceDir)\Microsoft.WindowsAzure.Setup.CA.dll"/>
<CustomAction Id="UpdatePSShortcut" BinaryKey="CustomActions" DllEntry="UpdatePSShortcut" Execute ="deferred" Impersonate="no"/>
<CustomAction Id="SetCustomActionDataValue" Return="check" Property="UpdatePSShortcut"
Value="ShortcutPath=[AzureSdkMenu]Microsoft Azure PowerShell.lnk;DefaultShortcutPath=[ProgramMenuFolder]System Tools\Windows PowerShell.lnk" />
<InstallExecuteSequence>
<Custom Action="SetCustomActionDataValue" After="CreateShortcuts">NOT Installed</Custom>
<Custom Action="UpdatePSShortcut" After="SetCustomActionDataValue">NOT Installed</Custom>
</InstallExecuteSequence>
<WixVariable Id="WixUILicenseRtf" Value="$(var.ProjectDir)\media\License.rtf" />
<UIRef Id="WixUI_Minimal" />
<WixVariable Id="WixUIBannerBmp" Value="media\bannrbmp.bmp" />
<WixVariable Id="WixUIDialogBmp" Value="media\dlgbmp.bmp" />
</Product>
<?include azurecmdfiles.wxi ?>
</Wix>