|
1 | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
2 |
| -<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> |
| 2 | +<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"> |
3 | 3 |
|
4 | 4 | <?define productName="Microsoft Azure PowerShell - November 2015" ?>
|
5 | 5 | <?define sourceDir="$(var.SolutionDir)..\src\Package\$(var.Configuration)" ?>
|
|
40 | 40 | </SetProperty>
|
41 | 41 |
|
42 | 42 | <SetProperty Id="POWERSHELLEXE" Value="[WindowsFolder]System32\WindowsPowerShell\v1.0\powershell.exe" Before="AppSearch"/>
|
| 43 | + |
| 44 | + <util:CloseApplication Id="ClosePowerShellExe" Target="powershell.exe" ElevatedCloseMessage="yes" CloseMessage="yes" PromptToContinue="yes" Description="PowerShell must be closed to continue with this installation. Please close any PowerShell windows and click 'Retry', or click 'Cancel' to stop installation. If you click 'Ignore' the installer will attempt to close any open PowerShell window."/> |
| 45 | + <util:CloseApplication Id="ClosePowerShellIseExe" Target="powershell_ise.exe" ElevatedCloseMessage="yes" CloseMessage="yes" PromptToContinue="yes" Description="PowerShell ISE must be closed to continue with this installation. Please close any PowerShell ISE windows and click 'Retry', or click 'Cancel' to stop installation. If you click 'Ignore' the installer will attempt to close any open PowerShell ISE window."/> |
43 | 46 |
|
44 | 47 | <Condition Message="This setup requires the Windows PowerShell 3.0 or compatible version to be installed.">
|
45 | 48 | <!-- This condition will break if PowerShell has version x3.0 and it is not compatible with 3.0 -->
|
|
119 | 122 | <CustomAction Id="UpdatePSShortcut" BinaryKey="CustomActions" DllEntry="UpdatePSShortcut" Execute ="deferred" Impersonate="no"/>
|
120 | 123 | <CustomAction Id="SetCustomActionDataValue" Return="check" Property="UpdatePSShortcut"
|
121 | 124 | Value="ShortcutPath=[AzureSdkMenu]Microsoft Azure PowerShell.lnk;DefaultShortcutPath=[ProgramMenuFolder]System Tools\Windows PowerShell.lnk" />
|
122 |
| - <CustomAction Id="SetExecutionPolicy" Property="POWERSHELLEXE" ExeCommand="-NoLogo -NoProfile -ExecutionPolicy Bypass -Command ". \"[PowerShellFolder]SetExecutionPolicy.ps1\""" Execute="deferred" Impersonate="no" Return="check"/> |
123 |
| - <CustomAction Id="RemoveGalleryModules" Property="POWERSHELLEXE" ExeCommand="-NoLogo -NoProfile -ExecutionPolicy Bypass -Command ". \"[PowerShellFolder]RemoveGalleryModules.ps1\""" Execute="deferred" Impersonate="no" Return="check"/> |
| 125 | + <CustomAction Id="SetExecutionPolicy" Property="POWERSHELLEXE" ExeCommand="-NoLogo -NoProfile -WindowStyle Hidden -NonInteractive -ExecutionPolicy Bypass -Command ". \"[PowerShellFolder]SetExecutionPolicy.ps1\""" Execute="deferred" Impersonate="no" Return="check"/> |
| 126 | + <CustomAction Id="RemoveGalleryModules" Property="POWERSHELLEXE" ExeCommand="-NoLogo -NoProfile -WindowStyle Hidden -NonInteractive -ExecutionPolicy Bypass -Command ". \"[PowerShellFolder]RemoveGalleryModules.ps1\""" Execute="deferred" Impersonate="no" Return="check"/> |
124 | 127 |
|
125 | 128 | <InstallExecuteSequence>
|
126 | 129 | <Custom Action="SetCustomActionDataValue" After="CreateShortcuts">NOT Installed</Custom>
|
|
0 commit comments