|
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | 2 | <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> |
3 | | - |
| 3 | + |
4 | 4 | <?define productName="Microsoft Azure PowerShell - October 2015" ?> |
5 | 5 | <?define sourceDir="$(var.SolutionDir)..\src\Package\$(var.Configuration)" ?> |
6 | 6 | <?define caSourceDir="$(var.SolutionDir)setup\bin\$(var.Configuration)" ?> |
|
28 | 28 | <Property Id="ALLUSERS" Value="1" /> |
29 | 29 | <!-- per machine install--> |
30 | 30 |
|
31 | | - <Property Id="POWERSHELLEXE"><![CDATA[C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe]]></Property> |
32 | | - |
33 | 31 | <Property Id="PSCOMPATIBLEVERSION"> |
34 | 32 | <RegistrySearch Id="PSCOMPATIBLEVERSION" Root="HKLM" Key="SOFTWARE\Microsoft\PowerShell\3\PowerShellEngine" Name="PSCompatibleVersion" Type="raw" /> |
35 | 33 | </Property> |
|
60 | 58 | </Directory> |
61 | 59 |
|
62 | 60 | <Property Id="POWERSHELLPATH"> |
63 | | - <RegistrySearch Id="POWERSHELLPATH" |
| 61 | + <RegistrySearch Id="POWERSHELLPATH" |
64 | 62 | Type="raw" |
65 | 63 | Root="HKLM" |
66 | 64 | Key="SOFTWARE\Microsoft\PowerShell\3\PowerShellEngine" |
67 | 65 | Name="ApplicationBase" /> |
68 | 66 | </Property> |
69 | 67 |
|
| 68 | + <Property Id="POWERSHELLEXE" /> |
| 69 | + <SetProperty Id="POWERSHELLEXE" Value="[POWERSHELLPATH]\powershell.exe" Before="AppSearch"/> |
| 70 | + |
70 | 71 | <DirectoryRef Id="PowerShellFolder"> |
71 | | - <Component Id="PSModulePath.System" Guid="273525B9-7AAB-421A-90C8-8E50A1840B8D"> |
72 | | - <CreateFolder /> |
73 | | - <!-- Work around bug that PowerShell does not always consider default module paths. --> |
74 | | - <Environment Id="PSModulePath.SystemAppRoot" Action="set" Name="PSMODULEPATH" Part="last" Value="[PowerShellFolder]ServiceManagement" System="yes" /> |
75 | | - </Component> |
76 | 72 | <Component Id="AzureSdkShortcutScript" Guid="3d0d589a-b34c-4c48-9a4c-df78f286c6a3"> |
77 | 73 | <File Id="AzureSdkShortcutScriptFile" KeyPath="yes" Source="$(var.SolutionDir)\Setup\ShortcutStartup.ps1" /> |
78 | 74 | </Component> |
|
92 | 88 | </DirectoryRef> |
93 | 89 |
|
94 | 90 | <Feature Id="azurecmd" Title="Microsoft Azure PowerShell" Level="1" Description="Windows PowerShell commandlets"> |
95 | | - <ComponentRef Id="PSModulePath.System" /> |
96 | 91 | <ComponentRef Id="AzureSdkShortcut" /> |
97 | 92 | <ComponentRef Id="AzureSdkShortcutScript" /> |
98 | 93 | </Feature> |
99 | 94 |
|
100 | 95 | <Binary Id="CustomActions" SourceFile="$(var.caSourceDir)\Microsoft.WindowsAzure.Setup.CA.dll"/> |
101 | | - <CustomAction Id="UpdatePSShortcut" BinaryKey="CustomActions" DllEntry="UpdatePSShortcut" Execute ="deferred" Impersonate="no"/> |
102 | 96 | <CustomAction Id="SetCustomActionDataValue" Return="check" Property="UpdatePSShortcut" |
103 | 97 | Value="ShortcutPath=[AzureSdkMenu]Microsoft Azure PowerShell.lnk;DefaultShortcutPath=[ProgramMenuFolder]System Tools\Windows PowerShell.lnk" /> |
| 98 | + <CustomAction Id="UpdatePSShortcut" BinaryKey="CustomActions" DllEntry="UpdatePSShortcut" Execute ="deferred" Impersonate="no"/> |
104 | 99 | <CustomAction Id="SetExecutionPolicy" Property="POWERSHELLEXE" ExeCommand="-NoLogo -NoProfile -Command "Set-ExecutionPolicy RemoteSigned -Force"" Execute="deferred" Impersonate="no" Return="check"/> |
105 | 100 | <CustomAction Id="RunModuleInstallScript" Property="POWERSHELLEXE" ExeCommand="-NoLogo -NoProfile -Command ". \"[PowerShellFolder]\ShortcutStartup.ps1\" -Install"" Execute="deferred" Impersonate="no" Return="check"/> |
106 | 101 |
|
|
0 commit comments