<commit_before>﻿<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">

  <?define productName="Microsoft Azure PowerShell - January 2016" ?>
  <?define sourceDir="$(var.SolutionDir)..\src\Package\$(var.Configuration)" ?>
  <?define caSourceDir="$(var.SolutionDir)setup\bin\$(var.Configuration)" ?>

  <?define version="1.1.0" ?>
  <?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>

    <SetProperty Action="SetBase64" Id="BaseModulesFolder" Value="[ProgramFiles64Folder]WindowsPowerShell\Modules\" Before="AppSearch">
      VersionNT64
    </SetProperty>

    <SetProperty Action="SetBase32" Id="BaseModulesFolder" Value="[ProgramFilesFolder]WindowsPowerShell\Modules\" Before="AppSearch">
      NOT VersionNT64
    </SetProperty>

    <SetProperty Id="POWERSHELLEXE" Value="[WindowsFolder]System32\WindowsPowerShell\v1.0\powershell.exe" Before="AppSearch"/>
    
    <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."/>
    <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."/>

    <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="[BaseModulesFolder];[PowerShellFolder]ResourceManager\AzureResourceManager\;[PowerShellFolder]ServiceManagement\" System="yes" />
     </Component>
    </DirectoryRef>

    <DirectoryRef Id="PowerShellFolder">
      <Component Id="AzureSdkExecutionPolicyScript" Guid="3d0d589a-b34c-4c48-9a4c-df78f286c6a3">
        <File Id="AzureSdkExecutionPolicyScriptFile" KeyPath="yes" Source="$(var.SolutionDir)\Setup\SetExecutionPolicy.ps1" />
      </Component>
    </DirectoryRef>

    <DirectoryRef Id="PowerShellFolder">
      <Component Id="AzureSdkRemoveModulesScript" Guid="7d75fe67-88e4-40da-bc3d-874cb0438d30">
        <File Id="AzureSdkRemoveModulesScriptFile" KeyPath="yes" Source="$(var.SolutionDir)\Setup\RemoveGalleryModules.ps1" />
      </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 &quot;[PowerShellFolder]ServiceManagement\Azure\Services\ShortcutStartup.ps1&quot;"/>
        <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" />
      <ComponentRef Id="AzureSdkExecutionPolicyScript" />
      <ComponentRef Id="AzureSdkRemoveModulesScript" />
   </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" />
    <CustomAction Id="SetExecutionPolicy" Property="POWERSHELLEXE" ExeCommand="-NoLogo -NoProfile -WindowStyle Hidden -NonInteractive -ExecutionPolicy Bypass -Command &quot;. \&quot;[PowerShellFolder]SetExecutionPolicy.ps1\&quot;&quot;" Execute="deferred" Impersonate="no" Return="check"/>
    <CustomAction Id="RemoveGalleryModules" Property="POWERSHELLEXE" ExeCommand="-NoLogo -NoProfile -WindowStyle Hidden -NonInteractive -ExecutionPolicy Bypass -Command &quot;. \&quot;[PowerShellFolder]RemoveGalleryModules.ps1\&quot;&quot;" Execute="deferred" Impersonate="no" Return="check"/>

    <InstallExecuteSequence>
      <Custom Action="SetCustomActionDataValue" After="CreateShortcuts">NOT Installed</Custom>
      <Custom Action="RemoveGalleryModules" After="SetCustomActionDataValue">NOT Installed</Custom>
      <Custom Action="UpdatePSShortcut" After="RemoveGalleryModules">NOT Installed</Custom>
      <Custom Action="SetExecutionPolicy" After="UpdatePSShortcut">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><commit_msg>Get ride of startmenu shortcut of msi.<commit_after>﻿<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">

  <?define productName="Microsoft Azure PowerShell - January 2016" ?>
  <?define sourceDir="$(var.SolutionDir)..\src\Package\$(var.Configuration)" ?>
  <?define caSourceDir="$(var.SolutionDir)setup\bin\$(var.Configuration)" ?>

  <?define version="1.1.0" ?>

  <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>

    <SetProperty Action="SetBase64" Id="BaseModulesFolder" Value="[ProgramFiles64Folder]WindowsPowerShell\Modules\" Before="AppSearch">
      VersionNT64
    </SetProperty>

    <SetProperty Action="SetBase32" Id="BaseModulesFolder" Value="[ProgramFilesFolder]WindowsPowerShell\Modules\" Before="AppSearch">
      NOT VersionNT64
    </SetProperty>

    <SetProperty Id="POWERSHELLEXE" Value="[WindowsFolder]System32\WindowsPowerShell\v1.0\powershell.exe" Before="AppSearch"/>
    
    <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."/>
    <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."/>

    <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>

    <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="[BaseModulesFolder];[PowerShellFolder]ResourceManager\AzureResourceManager\;[PowerShellFolder]ServiceManagement\" System="yes" />
     </Component>
    </DirectoryRef>

    <DirectoryRef Id="PowerShellFolder">
      <Component Id="AzureSdkExecutionPolicyScript" Guid="3d0d589a-b34c-4c48-9a4c-df78f286c6a3">
        <File Id="AzureSdkExecutionPolicyScriptFile" KeyPath="yes" Source="$(var.SolutionDir)\Setup\SetExecutionPolicy.ps1" />
      </Component>
    </DirectoryRef>

    <DirectoryRef Id="PowerShellFolder">
      <Component Id="AzureSdkRemoveModulesScript" Guid="7d75fe67-88e4-40da-bc3d-874cb0438d30">
        <File Id="AzureSdkRemoveModulesScriptFile" KeyPath="yes" Source="$(var.SolutionDir)\Setup\RemoveGalleryModules.ps1" />
      </Component>
    </DirectoryRef>

    <Feature Id="azurecmd" Title="Microsoft Azure PowerShell" Level="1" Description="Windows PowerShell commandlets">
      <ComponentGroupRef Id="azurecmdfiles" />
      <ComponentRef Id="PSModulePath.System" />
      <ComponentRef Id="AzureSdkExecutionPolicyScript" />
      <ComponentRef Id="AzureSdkRemoveModulesScript" />
   </Feature>

    <Binary Id="CustomActions" SourceFile="$(var.caSourceDir)\Microsoft.WindowsAzure.Setup.CA.dll"/>
    <CustomAction Id="SetExecutionPolicy" Property="POWERSHELLEXE" ExeCommand="-NoLogo -NoProfile -WindowStyle Hidden -NonInteractive -ExecutionPolicy Bypass -Command &quot;. \&quot;[PowerShellFolder]SetExecutionPolicy.ps1\&quot;&quot;" Execute="deferred" Impersonate="no" Return="check"/>
    <CustomAction Id="RemoveGalleryModules" Property="POWERSHELLEXE" ExeCommand="-NoLogo -NoProfile -WindowStyle Hidden -NonInteractive -ExecutionPolicy Bypass -Command &quot;. \&quot;[PowerShellFolder]RemoveGalleryModules.ps1\&quot;&quot;" Execute="deferred" Impersonate="no" Return="check"/>

    <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>
{'fraction_non_alphanumeric': 0.13131244936537942, 'fraction_numerical': 0.020726438023224412, 'mean_word_length': 4.441954445260838, 'pattern_counts': {'":': 0, '<': 186, '<?xml version=': 2, '>': 186, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7176801', 'n_tokens_mistral': 4555, 'n_tokens_neox': 4275, 'n_words': 859}