# # DealBreaker - Windows retail ISO download link generator # Copyright © 2019 Pete Batard # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # Load Assembly and Library Add-Type -AssemblyName PresentationFramework # Input parameters $Language = "en-US" # Data $WindowsVersions = @( @( "Windows 10", @( "1809 R2", @("Windows 10 Home/Pro", 1060), @("Windows 10 Education", 1056) ), @( "1809 R1", @("Windows 10 Home/Pro", 1019), @("Windows 10 Education", 1021) ), @( "1803", @("Windows 10 Home/Pro", 651), @("Windows 10 Education", 655), @("Windows 10 Enterprise Eval", 629) ) ), @( "Windows 8.1", @( "Full", @("Windows 8.1/Windows 8.1 Pro", 52), @("Windows 8.1 Single Language", 48) ), @( "N", @("Windows 8.1/Windows 8.1 Pro N", 55) ) ), @( "Windows 7", @( "SP1", @("Windows 7 Ultimate", 8), @("Windows 7 Pro", 4), @("Windows 7 Home Premium", 6), @("Windows 7 Home Basic", 2) ) ) ) # Functions function Add-Title([string]$Name) { $Title = New-Object System.Windows.Controls.TextBlock $Title.FontSize = $WindowsVersionTitle.FontSize $Title.Height = $WindowsVersionTitle.Height; $Title.Width = $WindowsVersionTitle.Width; $Title.HorizontalAlignment = "Left" $Title.VerticalAlignment = "Top" $Margin = $WindowsVersionTitle.Margin $Margin.Top += $global:stage * $dh $Title.Margin = $Margin $Title.Text = $Name return $Title } function Add-Combo { $Combo = New-Object System.Windows.Controls.ComboBox $Combo.FontSize = $WindowsVersion.FontSize $Combo.Height = $WindowsVersion.Height; $Combo.Width = $WindowsVersion.Width; $Combo.HorizontalAlignment = "Left" $Combo.VerticalAlignment = "Top" $Margin = $WindowsVersion.Margin $Margin.Top += $global:stage * $dh $Combo.Margin = $Margin $Combo.SelectedIndex = 0 return $Combo } # Form [xml]$Form = @"