├── .gitignore ├── LICENSE.md ├── README.md ├── bin ├── .gitignore └── readme.md ├── install.ps1 ├── scripts ├── BuildTemplates.ps1 ├── answer_files │ ├── 7 │ │ └── autounattend.xml │ ├── 10 │ │ └── autounattend.xml │ ├── 81 │ │ └── autounattend.xml │ └── 10_preview │ │ └── autounattend.xml ├── apps │ ├── macappinstaller.sh │ └── winappinstaller.ps1 ├── dev-utils │ ├── disable-hyperv.cmd │ └── enable-hyperv.cmd ├── floppy │ ├── bginfo │ │ ├── .gitignore │ │ ├── background.jpg │ │ ├── bgconfig.bgi │ │ ├── install.vbs │ │ └── win10 │ │ │ └── bgconfig.bgi │ ├── common │ │ ├── finish-actions.ps1 │ │ ├── post-win-updates.ps1 │ │ ├── preprovisioner.cmd │ │ ├── preprovisioner.ps1 │ │ └── setautologon.ps1 │ ├── eula │ │ ├── win10 │ │ │ └── eula.txt │ │ ├── win7 │ │ │ └── eula.txt │ │ └── win81 │ │ │ └── eula.txt │ ├── homepage │ │ └── browser-homepage.ps1 │ ├── openssh │ │ └── openssh.ps1 │ ├── powershell │ │ ├── download.vbs │ │ └── powershell.cmd │ ├── updates │ │ ├── microsoft-updates.bat │ │ ├── win-updates-fake.ps1 │ │ └── win-updates.ps1 │ └── winrm │ │ ├── config-winrm.cmd │ │ └── start-winrm.ps1 ├── iso │ └── readme.md ├── provisioners │ ├── compact.bat │ ├── compactx86.bat │ ├── disable-autologon.bat │ ├── ie_setup_runner.cmd │ ├── ie_setup_runner.ps1 │ ├── ie_setup_runner_ps.cmd │ ├── restore-uac.bat │ ├── vm-guest-tools.bat │ └── vm-guest-toolsx86.bat ├── template-parts │ ├── email-template.html │ ├── floppy_files_common.json │ ├── floppy_files_win10.json │ ├── floppy_files_win10_previewx64.json │ ├── floppy_files_win7.json │ ├── floppy_files_win81.json │ ├── parallels-command.template │ ├── pp-vagrant.json │ ├── provisioner_common.json │ ├── provisioner_commonx86.json │ ├── template │ │ ├── OSx64.json │ │ ├── floppy_files_OS.json │ │ ├── guest_os_types.txt │ │ └── urls_OSx64.json │ ├── urls_win10_previewx64.json │ ├── urls_win10x64.json │ ├── urls_win7x86.json │ ├── urls_win81x64.json │ ├── user.json │ ├── variables_win7_ie10.json │ ├── variables_win7_ie11.json │ ├── variables_win7_ie8.json │ ├── variables_win7_ie9.json │ ├── vpc.vmc.template │ ├── win10_previewx64.json │ ├── win10x64.json │ ├── win7x86.json │ └── win81x64.json ├── vmgen.ps1 └── vmsrename.ps1 ├── tools ├── VMSConfigGen │ ├── .vs │ │ └── config │ │ │ └── applicationhost.config │ ├── VMSConfigGen.sln │ └── VMSConfigGen │ │ ├── ConfigGenerator.cs │ │ ├── Parameters.cs │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Rules.cs │ │ └── VMSConfigGen.csproj ├── VMSGen │ ├── VMSGen.sln │ └── VMSGen │ │ ├── App.config │ │ ├── Model │ │ ├── Browser.cs │ │ ├── File.cs │ │ ├── OS.cs │ │ ├── Software.cs │ │ └── VMS.cs │ │ ├── Program.cs │ │ ├── Properties │ │ └── AssemblyInfo.cs │ │ ├── VMSGen.csproj │ │ ├── VmsJsonGenerator.cs │ │ ├── packages.config │ │ └── vmgen.json └── packermerge │ ├── PackerMerge.sln │ └── PackerMerge │ ├── App.config │ ├── CombinatorStrategyAdd.cs │ ├── PackerMerge.csproj │ ├── PackerTemplate.cs │ ├── PackerTemplateCombinator.cs │ ├── Parameters.cs │ ├── Program.cs │ ├── Properties │ └── AssemblyInfo.cs │ ├── packages.config │ └── template.json └── vms ├── release_notes_license_terms_8_1_15.docx └── release_notes_license_terms_8_1_15.pdf /.gitignore: -------------------------------------------------------------------------------- 1 | *.iso 2 | *.exe 3 | *.zip 4 | *.md5.txt 5 | *.zip.00? 6 | !scripts/**/*.exe 7 | bin/ 8 | # Packer builder outputs 9 | outputs/ 10 | output-hyperv-iso/ 11 | output-virtualbox-iso/ 12 | output-vmware-iso/ 13 | output-parallels-iso/ 14 | output-parallels-pvm/ 15 | ~$*.xlsx 16 | *.box 17 | generated/ 18 | vms/output/ 19 | scripts/template-output/ 20 | 21 | *.user 22 | tools/VMSGen/VMSGen/obj/ 23 | tools/VMSGen/VMSGen/bin/ 24 | tools/VMSGen/packages/ 25 | tools/PackerMerge/packages 26 | tools/PackerMerge/PackerMerge/bin/ 27 | tools/PackerMerge/PackerMerge/obj/ 28 | tools/PackerMerge/.vs/config/applicationhost.config 29 | tools/VMSGen/.vs/config/applicationhost.config 30 | tools/VMSConfigGen/VMSConfigGen/obj 31 | 32 | *.suo 33 | bin/*.vshost.exe.* 34 | bin/*.vshost.exe 35 | 36 | scripts/vmgen.json.lock 37 | scripts/vmgen.json 38 | scripts/floppy/build.cfg 39 | scripts/vmgen.log 40 | scripts/vmgen.cfg 41 | scripts/parallels-command.txt 42 | *.user -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) Microsoft Corporation. All rights reserved. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /bin/.gitignore: -------------------------------------------------------------------------------- 1 | /VMSGen/ 2 | /packermerge/ 3 | 4 | /PackerHyperv/ 5 | -------------------------------------------------------------------------------- /bin/readme.md: -------------------------------------------------------------------------------- 1 | Hereo you have to put all the binaries required for the execution. 2 | Please check the [main instructions](../readme.md) to know more about the files you have to put in here. -------------------------------------------------------------------------------- /install.ps1: -------------------------------------------------------------------------------- 1 | # -------------------------------------------------------------- 2 | # 3 | # dev.microsoftedge.com -VMs 4 | # Copyright(c) Microsoft Corporation. All rights reserved. 5 | # 6 | # MIT License 7 | # 8 | # Permission is hereby granted, free of charge, to any person obtaining 9 | # a copy of this software and associated documentation files(the ""Software""), 10 | # to deal in the Software without restriction, including without limitation the rights 11 | # to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies 12 | # of the Software, and to permit persons to whom the Software is furnished to do so, 13 | # subject to the following conditions : 14 | # 15 | # The above copyright notice and this permission notice shall be included 16 | # in all copies or substantial portions of the Software. 17 | # 18 | # THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 19 | # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 20 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS 21 | # OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 23 | # OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | # 25 | # -------------------------------------------------------------- 26 | 27 | Write-Output "Downloading all tools" 28 | 29 | function Download { 30 | param ( 31 | [string]$url, 32 | [string]$output 33 | ) 34 | 35 | $start_time = Get-Date 36 | (New-Object System.Net.WebClient).DownloadFile($url, $output) 37 | Write-Output "Time taken: $((Get-Date).Subtract($start_time).Seconds) second(s)" 38 | } 39 | 40 | function Install-Putty { 41 | Write-Output "Downloading and installing Putty" 42 | New-Item -ItemType Directory -Force -Path "$PSScriptRoot\bin\Putty\" | Out-Null 43 | Download -url "https://the.earth.li/~sgtatham/putty/latest/x86/putty.exe" -output "$PSScriptRoot\bin\Putty\putty.exe" 44 | } 45 | 46 | function Install-AzCopy { 47 | Write-Output "Downloading and installing AzCopy" 48 | $path = "$PSScriptRoot\bin" 49 | New-Item -ItemType Directory -Force -Path $path | Out-Null 50 | Download -url "http://aka.ms/downloadazcopy" -output "$path\azcopy-installer.msi" 51 | Start-Process msiexec -ArgumentList "/a $output /qb TARGETDIR=$path\AzCopy /quiet" -Wait 52 | Copy-Item -Path "$path\AzCopy\Microsoft SDKs\Azure\AzCopy\*.*" -Destination "$path\AzCopy" -Recurse 53 | Remove-Item -Recurse -Force "$path\AzCopy\Microsoft SDKs" 54 | Remove-Item -Recurse -Force $output 55 | } 56 | 57 | function Build-Project { 58 | param ( 59 | [string]$name 60 | ) 61 | 62 | Write-Output "Building $name" 63 | Start-Process "$PSScriptRoot\bin\nuget.exe" -ArgumentList "restore $PSScriptRoot\tools\$name\$name.sln" -Wait 64 | Start-Process msbuild -ArgumentList "$PSScriptRoot\tools\$name\$name\$name.csproj /t:Build" -Wait 65 | } 66 | 67 | function Build-Projects { 68 | Build-Project -name "PackerMerge" 69 | Build-Project -name "VMSGen" 70 | } 71 | 72 | function Install-Packer { 73 | Add-Type -AssemblyName System.IO.Compression.FileSystem 74 | Write-Output "Downloading Packer.io" 75 | $packer = "$PSScriptRoot\bin\packer.zip" 76 | Remove-Item -Recurse -Force $packer 77 | Download -url "https://releases.hashicorp.com/packer/0.10.2/packer_0.10.2_windows_amd64.zip" -output $packer 78 | [System.IO.Compression.ZipFile]::ExtractToDirectory($packer, "C:\packer\") 79 | } 80 | 81 | function Install-Build-Tools2 { 82 | Write-Output "Installing .Net Framework 4.6" 83 | choco install dotnet4.6 -y 84 | 85 | Write-Output "Installing .Net Framework 4.6 Target" 86 | choco install dotnet4.6-targetpack -y 87 | 88 | Write-Output "Installing MSBuild" 89 | choco install microsoft-build-tools -y 90 | 91 | Write-Output "Installing nuget" 92 | choco install nuget.commandline 93 | } 94 | 95 | function Install-Chocolatey { 96 | iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex 97 | } 98 | 99 | function Install-Dependencies { 100 | $dependencies = @("dotnet4.6", "dotnet4.6-targetpack", "microsoft-build-tools", "nuget.commandline", "azcopy", "putty.portable") 101 | foreach($dependency in $dependencies){ 102 | Write-Output "Installing $dependency" 103 | choco install $dependency -y 104 | } 105 | } 106 | 107 | #Install-Putty 108 | #Install-AzCopy 109 | Install-Chocolatey 110 | #Install-Build-Tools 111 | Install-Dependencies 112 | Build-Projects 113 | #Install-Packer 114 | 115 | -------------------------------------------------------------------------------- /scripts/BuildTemplates.ps1: -------------------------------------------------------------------------------- 1 | # -------------------------------------------------------------- 2 | # 3 | # dev.microsoftedge.com -VMs 4 | # Copyright(c) Microsoft Corporation. All rights reserved. 5 | # 6 | # MIT License 7 | # 8 | # Permission is hereby granted, free of charge, to any person obtaining 9 | # a copy of this software and associated documentation files(the ""Software""), 10 | # to deal in the Software without restriction, including without limitation the rights 11 | # to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies 12 | # of the Software, and to permit persons to whom the Software is furnished to do so, 13 | # subject to the following conditions : 14 | # 15 | # The above copyright notice and this permission notice shall be included 16 | # in all copies or substantial portions of the Software. 17 | # 18 | # THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 19 | # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 20 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS 21 | # OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 23 | # OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | # 25 | # -------------------------------------------------------------- 26 | 27 | 28 | function ReplaceVariableContent ($file, $vmname) { 29 | # packer doesnot replace vm_name variable 30 | (gc ".\template-output\$file.json").replace('{{ user `vmname` }}', $vmname) | sc ".\template-output\$file.json" 31 | 32 | } 33 | 34 | $template = "MSEdge-Win10_Preview" 35 | ..\bin\PackerMerge\PackerMerge -i:".\template-parts\user.json,.\template-parts\urls_win10_previewx64.json,.\template-parts\win10_previewx64.json,.\template-parts\floppy_files_common.json,.\template-parts\floppy_files_win10_previewx64.json,.\template-parts\provisioner_common.json,.\template-parts\pp-vagrant.json" -o:.\template-output\$template.json 36 | Write-Verbose "$template.json created." 37 | 38 | $template = "MSEdge-Win10" 39 | ..\bin\PackerMerge\PackerMerge -i:".\template-parts\user.json,.\template-parts\urls_win10x64.json,.\template-parts\win10x64.json,.\template-parts\floppy_files_common.json,.\template-parts\floppy_files_win10.json,.\template-parts\provisioner_common.json,.\template-parts\pp-vagrant.json" -o:.\template-output\$template.json 40 | Write-Verbose "$template.json created." 41 | 42 | $template = "IE11-Win81" 43 | ..\bin\PackerMerge\PackerMerge -i:".\template-parts\user.json,.\template-parts\urls_win81x64.json,.\template-parts\win81x64.json,.\template-parts\floppy_files_common.json,.\template-parts\floppy_files_win81.json,.\template-parts\provisioner_common.json,.\template-parts\pp-vagrant.json" -o:.\template-output\$template.json 44 | Write-Verbose "$template.json created." 45 | 46 | $template = "IE11-Win7" 47 | ..\bin\PackerMerge\PackerMerge -i:".\template-parts\variables_win7_ie11.json,.\template-parts\user.json,.\template-parts\urls_win7x86.json,.\template-parts\win7x86.json,.\template-parts\floppy_files_common.json,.\template-parts\floppy_files_win7.json,.\template-parts\pp-vagrant.json,.\template-parts\provisioner_commonx86.json" -o:.\template-output\$template.json 48 | ReplaceVariableContent $template "IE11 - Win7" 49 | Write-Verbose "$template.json created." 50 | 51 | $template = "IE10-Win7" 52 | ..\bin\PackerMerge\PackerMerge -i:".\template-parts\variables_win7_ie10.json,.\template-parts\user.json,.\template-parts\urls_win7x86.json,.\template-parts\win7x86.json,.\template-parts\floppy_files_common.json,.\template-parts\floppy_files_win7.json,.\template-parts\pp-vagrant.json,.\template-parts\provisioner_commonx86.json" -o:.\template-output\$template.json 53 | ReplaceVariableContent $template "IE10 - Win7" 54 | Write-Verbose "$template.json created." 55 | 56 | $template = "IE9-Win7" 57 | ..\bin\PackerMerge\PackerMerge -i:".\template-parts\variables_win7_ie9.json,.\template-parts\user.json,.\template-parts\urls_win7x86.json,.\template-parts\win7x86.json,.\template-parts\floppy_files_common.json,.\template-parts\floppy_files_win7.json,.\template-parts\pp-vagrant.json,.\template-parts\provisioner_commonx86.json" -o:.\template-output\$template.json 58 | ReplaceVariableContent $template "IE9 - Win7" 59 | Write-Verbose "$template.json created." 60 | 61 | $template = "IE8-Win7" 62 | ..\bin\PackerMerge\PackerMerge -i:".\template-parts\variables_win7_ie8.json,.\template-parts\user.json,.\template-parts\urls_win7x86.json,.\template-parts\win7x86.json,.\template-parts\floppy_files_common.json,.\template-parts\floppy_files_win7.json,.\template-parts\pp-vagrant.json,.\template-parts\provisioner_commonx86.json" -o:.\template-output\$template.json 63 | ReplaceVariableContent $template "IE8 - Win7" 64 | Write-Verbose "$template.json created." -------------------------------------------------------------------------------- /scripts/answer_files/7/autounattend.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 1 11 | Primary 12 | true 13 | 14 | 15 | 16 | 17 | false 18 | NTFS 19 | C 20 | 1 21 | 1 22 | 23 | 24 | 25 | 0 26 | true 27 | 28 | OnError 29 | 30 | 31 | true 32 | IEUser Administrator 33 | Microsoft 34 | 35 | Never 36 | 37 | 38 | 39 | 40 | 41 | 0 42 | 1 43 | 44 | OnError 45 | false 46 | 47 | 48 | /IMAGE/NAME 49 | Windows 7 Enterprise 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | en-US 58 | 59 | en-US 60 | en-US 61 | en-US 62 | en-US 63 | en-US 64 | 65 | 66 | 67 | 68 | false 69 | 70 | 71 | 72 | 73 | 74 | 75 | UABhAHMAcwB3ADAAcgBkACEAQQBkAG0AaQBuAGkAcwB0AHIAYQB0AG8AcgBQAGEAcwBzAHcAbwByAGQA 76 | false</PlainText> 77 | </AdministratorPassword> 78 | <LocalAccounts> 79 | <LocalAccount wcm:action="add"> 80 | <Password> 81 | <Value>UABhAHMAcwB3ADAAcgBkACEAUABhAHMAcwB3AG8AcgBkAA==</Value> 82 | <PlainText>false</PlainText> 83 | </Password> 84 | <Description>IEUser</Description> 85 | <DisplayName>IEUser</DisplayName> 86 | <Group>administrators</Group> 87 | <Name>IEUser</Name> 88 | </LocalAccount> 89 | </LocalAccounts> 90 | </UserAccounts> 91 | <OOBE> 92 | <HideEULAPage>true</HideEULAPage> 93 | <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> 94 | <NetworkLocation>Home</NetworkLocation> 95 | <ProtectYourPC>1</ProtectYourPC> 96 | </OOBE> 97 | <AutoLogon> 98 | <Password> 99 | <Value>UABhAHMAcwB3ADAAcgBkACEAUABhAHMAcwB3AG8AcgBkAA==</Value> 100 | <PlainText>false</PlainText> 101 | </Password> 102 | <Username>IEUser</Username> 103 | <Enabled>true</Enabled> 104 | </AutoLogon> 105 | <FirstLogonCommands> 106 | <SynchronousCommand wcm:action="add"> 107 | <CommandLine>cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"</CommandLine> 108 | <Description>Set Execution Policy 64 Bit</Description> 109 | <Order>1</Order> 110 | <RequiresUserInput>true</RequiresUserInput> 111 | </SynchronousCommand> 112 | <SynchronousCommand wcm:action="add"> 113 | <CommandLine>C:\Windows\SysWOW64\cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"</CommandLine> 114 | <Description>Set Execution Policy 32 Bit</Description> 115 | <Order>2</Order> 116 | <RequiresUserInput>true</RequiresUserInput> 117 | </SynchronousCommand> 118 | <SynchronousCommand wcm:action="add"> 119 | <CommandLine>%SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v HideFileExt /t REG_DWORD /d 0 /f</CommandLine> 120 | <Order>3</Order> 121 | <Description>Show file extensions in Explorer</Description> 122 | </SynchronousCommand> 123 | <SynchronousCommand wcm:action="add"> 124 | <CommandLine>%SystemRoot%\System32\reg.exe ADD HKCU\Console /v QuickEdit /t REG_DWORD /d 1 /f</CommandLine> 125 | <Order>4</Order> 126 | <Description>Enable QuickEdit mode</Description> 127 | </SynchronousCommand> 128 | <SynchronousCommand wcm:action="add"> 129 | <CommandLine>%SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v Start_ShowRun /t REG_DWORD /d 1 /f</CommandLine> 130 | <Order>5</Order> 131 | <Description>Show Run command in Start Menu</Description> 132 | </SynchronousCommand> 133 | <SynchronousCommand wcm:action="add"> 134 | <CommandLine>%SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v StartMenuAdminTools /t REG_DWORD /d 1 /f</CommandLine> 135 | <Order>6</Order> 136 | <Description>Show Administrative Tools in Start Menu</Description> 137 | </SynchronousCommand> 138 | <SynchronousCommand wcm:action="add"> 139 | <CommandLine>%SystemRoot%\System32\reg.exe ADD HKLM\SYSTEM\CurrentControlSet\Control\Power\ /v HibernateFileSizePercent /t REG_DWORD /d 0 /f</CommandLine> 140 | <Order>7</Order> 141 | <Description>Zero Hibernation File</Description> 142 | </SynchronousCommand> 143 | <SynchronousCommand wcm:action="add"> 144 | <CommandLine>%SystemRoot%\System32\reg.exe ADD HKLM\SYSTEM\CurrentControlSet\Control\Power\ /v HibernateEnabled /t REG_DWORD /d 0 /f</CommandLine> 145 | <Order>8</Order> 146 | <Description>Disable Hibernation Mode</Description> 147 | </SynchronousCommand> 148 | <SynchronousCommand wcm:action="add"> 149 | <CommandLine>cmd.exe /c wmic useraccount where "name='IEUser'" set PasswordExpires=FALSE</CommandLine> 150 | <Order>9</Order> 151 | <Description>Disable password expiration for IEUser user</Description> 152 | </SynchronousCommand> 153 | <SynchronousCommand wcm:action="add"> 154 | <CommandLine>REG ADD &quot;HKLM\System\CurrentControlSet\Control\Network\NewNetworkWindowOff&quot;</CommandLine> 155 | <Description>Disable set Network Location</Description> 156 | <Order>12</Order> 157 | <RequiresUserInput>true</RequiresUserInput> 158 | </SynchronousCommand> 159 | <SynchronousCommand wcm:action="add"> 160 | <CommandLine> REG ADD “HKLM\System\CurrentControlSet\Services\Netlogon\Parameters” /v DisablePasswordChange /t REG_DWORD /d 2 /f</CommandLine> 161 | <Description>Disable computer password change</Description> 162 | <Order>13</Order> 163 | <RequiresUserInput>true</RequiresUserInput> 164 | </SynchronousCommand> 165 | <SynchronousCommand wcm:action="add"> 166 | <CommandLine>wscript a:\install.vbs</CommandLine> 167 | <Description>Change background with System Information</Description> 168 | <RequiresUserInput>true</RequiresUserInput> 169 | <Order>14</Order> 170 | </SynchronousCommand> 171 | <SynchronousCommand wcm:action="add"> 172 | <CommandLine>cmd.exe /c a:\microsoft-updates.bat</CommandLine> 173 | <Order>98</Order> 174 | <Description>Enable Microsoft Updates</Description> 175 | </SynchronousCommand> 176 | <SynchronousCommand wcm:action="add"> 177 | <CommandLine>cmd.exe /c a:\preprovisioner.cmd</CommandLine> 178 | <Description>Install IEBlocker, Windows Updates</Description> 179 | <Order>100</Order> 180 | <RequiresUserInput>true</RequiresUserInput> 181 | </SynchronousCommand> 182 | </FirstLogonCommands> 183 | <ShowWindowsLive>false</ShowWindowsLive> 184 | </component> 185 | </settings> 186 | <settings pass="specialize"> 187 | <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> 188 | <OEMInformation> 189 | <HelpCustomized>false</HelpCustomized> 190 | </OEMInformation> 191 | <!-- Rename computer here. --> 192 | <ComputerName>IEWIN7</ComputerName> 193 | <TimeZone>Pacific Standard Time</TimeZone> 194 | <RegisteredOwner /> 195 | </component> 196 | <component name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 197 | <SkipAutoActivation>true</SkipAutoActivation> 198 | </component> 199 | </settings> 200 | </unattend> 201 | -------------------------------------------------------------------------------- /scripts/answer_files/81/autounattend.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="utf-8"?> 2 | <unattend xmlns="urn:schemas-microsoft-com:unattend"> 3 | <servicing /> 4 | <settings pass="windowsPE"> 5 | <component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 6 | <DiskConfiguration> 7 | <Disk wcm:action="add"> 8 | <CreatePartitions> 9 | <CreatePartition wcm:action="add"> 10 | <Order>1</Order> 11 | <Type>Primary</Type> 12 | <Extend>true</Extend> 13 | </CreatePartition> 14 | </CreatePartitions> 15 | <ModifyPartitions> 16 | <ModifyPartition wcm:action="add"> 17 | <Extend>false</Extend> 18 | <Format>NTFS</Format> 19 | <Letter>C</Letter> 20 | <Order>1</Order> 21 | <PartitionID>1</PartitionID> 22 | <Label>Windows 81</Label> 23 | </ModifyPartition> 24 | </ModifyPartitions> 25 | <DiskID>0</DiskID> 26 | <WillWipeDisk>true</WillWipeDisk> 27 | </Disk> 28 | <WillShowUI>OnError</WillShowUI> 29 | </DiskConfiguration> 30 | <UserData> 31 | <AcceptEula>true</AcceptEula> 32 | <FullName>IEUser Administrator</FullName> 33 | <Organization>Microsoft</Organization> 34 | <ProductKey> 35 | <WillShowUI>Never</WillShowUI> 36 | </ProductKey> 37 | </UserData> 38 | <ImageInstall> 39 | <OSImage> 40 | <InstallTo> 41 | <DiskID>0</DiskID> 42 | <PartitionID>1</PartitionID> 43 | </InstallTo> 44 | <WillShowUI>OnError</WillShowUI> 45 | <InstallToAvailablePartition>false</InstallToAvailablePartition> 46 | <InstallFrom> 47 | <MetaData wcm:action="add"> 48 | <Key>/IMAGE/NAME</Key> 49 | <Value>Windows 8.1 Enterprise Evaluation</Value> 50 | </MetaData> 51 | </InstallFrom> 52 | </OSImage> 53 | </ImageInstall> 54 | </component> 55 | <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 56 | <SetupUILanguage> 57 | <UILanguage>en-US</UILanguage> 58 | </SetupUILanguage> 59 | <InputLocale>en-US</InputLocale> 60 | <SystemLocale>en-US</SystemLocale> 61 | <UILanguage>en-US</UILanguage> 62 | <UILanguageFallback>en-US</UILanguageFallback> 63 | <UserLocale>en-US</UserLocale> 64 | </component> 65 | </settings> 66 | <settings pass="offlineServicing"> 67 | <component name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> 68 | <EnableLUA>false</EnableLUA> 69 | </component> 70 | </settings> 71 | <settings pass="oobeSystem"> 72 | <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 73 | <UserAccounts> 74 | <AdministratorPassword> 75 | <Value>UABhAHMAcwB3ADAAcgBkACEAQQBkAG0AaQBuAGkAcwB0AHIAYQB0AG8AcgBQAGEAcwBzAHcAbwByAGQA</Value> 76 | <PlainText>false</PlainText> 77 | </AdministratorPassword> 78 | <LocalAccounts> 79 | <LocalAccount wcm:action="add"> 80 | <Password> 81 | <Value>UABhAHMAcwB3ADAAcgBkACEAUABhAHMAcwB3AG8AcgBkAA==</Value> 82 | <PlainText>false</PlainText> 83 | </Password> 84 | <Description>IEUser</Description> 85 | <DisplayName>IEUser</DisplayName> 86 | <Group>administrators</Group> 87 | <Name>IEUser</Name> 88 | </LocalAccount> 89 | </LocalAccounts> 90 | </UserAccounts> 91 | <OOBE> 92 | <HideEULAPage>true</HideEULAPage> 93 | <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> 94 | <NetworkLocation>Home</NetworkLocation> 95 | <ProtectYourPC>1</ProtectYourPC> 96 | </OOBE> 97 | <AutoLogon> 98 | <Password> 99 | <Value>UABhAHMAcwB3ADAAcgBkACEAUABhAHMAcwB3AG8AcgBkAA==</Value> 100 | <PlainText>false</PlainText> 101 | </Password> 102 | <Username>IEUser</Username> 103 | <Enabled>true</Enabled> 104 | </AutoLogon> 105 | <FirstLogonCommands> 106 | <SynchronousCommand wcm:action="add"> 107 | <CommandLine>cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"</CommandLine> 108 | <Description>Set Execution Policy 64 Bit</Description> 109 | <Order>1</Order> 110 | <RequiresUserInput>true</RequiresUserInput> 111 | </SynchronousCommand> 112 | <SynchronousCommand wcm:action="add"> 113 | <CommandLine>C:\Windows\SysWOW64\cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"</CommandLine> 114 | <Description>Set Execution Policy 32 Bit</Description> 115 | <Order>2</Order> 116 | <RequiresUserInput>true</RequiresUserInput> 117 | </SynchronousCommand> 118 | <SynchronousCommand wcm:action="add"> 119 | <CommandLine>%SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v HideFileExt /t REG_DWORD /d 0 /f</CommandLine> 120 | <Order>3</Order> 121 | <Description>Show file extensions in Explorer</Description> 122 | </SynchronousCommand> 123 | <SynchronousCommand wcm:action="add"> 124 | <CommandLine>%SystemRoot%\System32\reg.exe ADD HKCU\Console /v QuickEdit /t REG_DWORD /d 1 /f</CommandLine> 125 | <Order>4</Order> 126 | <Description>Enable QuickEdit mode</Description> 127 | </SynchronousCommand> 128 | <SynchronousCommand wcm:action="add"> 129 | <CommandLine>%SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v Start_ShowRun /t REG_DWORD /d 1 /f</CommandLine> 130 | <Order>5</Order> 131 | <Description>Show Run command in Start Menu</Description> 132 | </SynchronousCommand> 133 | <SynchronousCommand wcm:action="add"> 134 | <CommandLine>%SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v StartMenuAdminTools /t REG_DWORD /d 1 /f</CommandLine> 135 | <Order>6</Order> 136 | <Description>Show Administrative Tools in Start Menu</Description> 137 | </SynchronousCommand> 138 | <SynchronousCommand wcm:action="add"> 139 | <CommandLine>%SystemRoot%\System32\reg.exe ADD HKLM\SYSTEM\CurrentControlSet\Control\Power\ /v HibernateFileSizePercent /t REG_DWORD /d 0 /f</CommandLine> 140 | <Order>7</Order> 141 | <Description>Zero Hibernation File</Description> 142 | </SynchronousCommand> 143 | <SynchronousCommand wcm:action="add"> 144 | <CommandLine>%SystemRoot%\System32\reg.exe ADD HKLM\SYSTEM\CurrentControlSet\Control\Power\ /v HibernateEnabled /t REG_DWORD /d 0 /f</CommandLine> 145 | <Order>8</Order> 146 | <Description>Disable Hibernation Mode</Description> 147 | </SynchronousCommand> 148 | <SynchronousCommand wcm:action="add"> 149 | <CommandLine>cmd.exe /c wmic useraccount where "name='IEUser'" set PasswordExpires=FALSE</CommandLine> 150 | <Order>9</Order> 151 | <Description>Disable password expiration for IEUser user</Description> 152 | </SynchronousCommand> 153 | <SynchronousCommand wcm:action="add"> 154 | <CommandLine>REG ADD &quot;HKLM\System\CurrentControlSet\Control\Network\NewNetworkWindowOff&quot;</CommandLine> 155 | <Description>Disable set Network Location</Description> 156 | <Order>12</Order> 157 | <RequiresUserInput>true</RequiresUserInput> 158 | </SynchronousCommand> 159 | <SynchronousCommand wcm:action="add"> 160 | <CommandLine> REG ADD “HKLM\System\CurrentControlSet\Services\Netlogon\Parameters” /v DisablePasswordChange /t REG_DWORD /d 2 /f</CommandLine> 161 | <Description>Disable computer password change</Description> 162 | <Order>13</Order> 163 | <RequiresUserInput>true</RequiresUserInput> 164 | </SynchronousCommand> 165 | <SynchronousCommand wcm:action="add"> 166 | <CommandLine>wscript a:\install.vbs</CommandLine> 167 | <Description>Change background with System Information</Description> 168 | <RequiresUserInput>true</RequiresUserInput> 169 | <Order>14</Order> 170 | </SynchronousCommand> 171 | <SynchronousCommand wcm:action="add"> 172 | <CommandLine>cmd.exe /c a:\microsoft-updates.bat</CommandLine> 173 | <Order>98</Order> 174 | <Description>Enable Microsoft Updates</Description> 175 | </SynchronousCommand> 176 | <SynchronousCommand wcm:action="add"> 177 | <CommandLine>cmd.exe /c a:\preprovisioner.cmd</CommandLine> 178 | <Description>Install IEBlocker, Windows Updates</Description> 179 | <Order>100</Order> 180 | <RequiresUserInput>true</RequiresUserInput> 181 | </SynchronousCommand> 182 | </FirstLogonCommands> 183 | <ShowWindowsLive>false</ShowWindowsLive> 184 | </component> 185 | </settings> 186 | <settings pass="specialize"> 187 | <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> 188 | <OEMInformation> 189 | <HelpCustomized>false</HelpCustomized> 190 | </OEMInformation> 191 | <!-- Rename computer here. --> 192 | <ComputerName>IE11WIN8_1</ComputerName> 193 | <TimeZone>Pacific Standard Time</TimeZone> 194 | <RegisteredOwner /> 195 | </component> 196 | <component name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 197 | <SkipAutoActivation>true</SkipAutoActivation> 198 | </component> 199 | </settings> 200 | </unattend> 201 | -------------------------------------------------------------------------------- /scripts/apps/macappinstaller.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | Echo Installing homebrew 4 | /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 5 | brew tap caskroom/cask 6 | brew tap homebrew/core 7 | 8 | Echo Installing programs 9 | # Packer for Mac 10 | brew install packer 11 | # Parallels Desktop 11 for Mac 12 | brew cask install parallels-desktop -------------------------------------------------------------------------------- /scripts/apps/winappinstaller.ps1: -------------------------------------------------------------------------------- 1 | Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) 2 | #Packer 1.0.0 3 | cinst packer -y 4 | # VirtualBox 5.1.22 for Windows hosts 5 | cinst virtualbox -y 6 | # VMware Workstation 12.5.6 7 | cinst vmwareworkstation -y 8 | # 7-Zip 16.4.0 for Windows 64bits 9 | cinst 7zip -y 10 | # AzCopy 3.1.0 11 | cinst azcopy -y 12 | #move the azcopy binaries to the bin folder 13 | $AzPath = ${Env:ProgramFiles(x86)} + "\Microsoft SDKs\Azure\AzCopy" 14 | $Destination = "..\..\bin\AzCopy" 15 | if(Test-Path $Destination){ 16 | Remove-Item $Destination -recurse 17 | } 18 | New-Item $Destination -Type Directory 19 | Copy-Item $AzPath\* $Destination 20 | # Putty 21 | cinst putty.install -y 22 | #move the putty binaries to the bin folder 23 | $PuttyPath = ${Env:ProgramFiles} + "\PuTTY" 24 | $Destination = "..\..\bin\putty" 25 | if(Test-Path $Destination){ 26 | Remove-Item $Destination -recurse 27 | } 28 | New-Item $Destination -Type Directory 29 | Copy-Item $PuttyPath\* $Destination 30 | # Visual Studio 2015 Community 31 | cinst visualstudio2015community -y -------------------------------------------------------------------------------- /scripts/dev-utils/disable-hyperv.cmd: -------------------------------------------------------------------------------- 1 | bcdedit /set hypervisorlaunchtype off -------------------------------------------------------------------------------- /scripts/dev-utils/enable-hyperv.cmd: -------------------------------------------------------------------------------- 1 | bcdedit /set hypervisorlaunchtype auto -------------------------------------------------------------------------------- /scripts/floppy/bginfo/.gitignore: -------------------------------------------------------------------------------- 1 | /Bginfo.exe 2 | -------------------------------------------------------------------------------- /scripts/floppy/bginfo/background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftEdge/dev.microsoftedge.com-vms/f61e112dc7bbb1ab8fce0e8a852237e090141a36/scripts/floppy/bginfo/background.jpg -------------------------------------------------------------------------------- /scripts/floppy/bginfo/bgconfig.bgi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftEdge/dev.microsoftedge.com-vms/f61e112dc7bbb1ab8fce0e8a852237e090141a36/scripts/floppy/bginfo/bgconfig.bgi -------------------------------------------------------------------------------- /scripts/floppy/bginfo/install.vbs: -------------------------------------------------------------------------------- 1 | '-------------------------------------------------------------- 2 | ' 3 | ' dev.microsoftedge.com -VMs 4 | ' Copyright(c) Microsoft Corporation. All rights reserved. 5 | ' 6 | ' MIT License 7 | ' 8 | ' Permission is hereby granted, free of charge, to any person obtaining 9 | ' a copy of this software and associated documentation files(the ""Software""), 10 | ' to deal in the Software without restriction, including without limitation the rights 11 | ' to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies 12 | ' of the Software, and to permit persons to whom the Software is furnished to do so, 13 | ' subject to the following conditions : 14 | ' 15 | ' The above copyright notice and this permission notice shall be included 16 | ' in all copies or substantial portions of the Software. 17 | ' 18 | ' THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 19 | ' INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 20 | ' FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS 21 | ' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | ' WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 23 | ' OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | ' 25 | '-------------------------------------------------------------- 26 | '======================================================================================== 27 | ' BGinfo Installation Script 28 | '======================================================================================== 29 | ' 30 | ' Script Details: 31 | ' -------------- 32 | ' This script copies the BGinfo files to the C:\bginfo folder and sets the run registry key 33 | '======================================================================================== 34 | Option Explicit 35 | 36 | Dim objShell, objFSO, intErrorCode 37 | 38 | Set objShell = CreateObject("WScript.Shell") 39 | Set objFSO = createobject("scripting.filesystemobject") 40 | 41 | On Error Resume Next 42 | 43 | If not objFSO.FolderExists("C:\BGinfo") Then 44 | objFSO.CreateFolder("C:\BGinfo") 45 | End If 46 | 47 | intErrorCode = intErrorCode + objFSO.CopyFile("A:\Bginfo.exe", "C:\BGinfo\") 48 | intErrorCode = intErrorCode + objFSO.CopyFile("A:\bgconfig.bgi", "C:\BGinfo\") 49 | intErrorCode = intErrorCode + objFSO.CopyFile("A:\background.jpg", "C:\BGinfo\") 50 | 51 | intErrorCode = intErrorCode + objshell.RegWrite("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\bginfo", "C:\BGinfo\Bginfo.exe /accepteula /ic:\bginfo\bgconfig.bgi /timer:0", "REG_SZ") 52 | 53 | objShell.Run "C:\bginfo\Bginfo.exe /accepteula /ic:\bginfo\bgconfig.bgi /timer:0" 54 | 55 | Set objShell = Nothing 56 | Set objFSO = Nothing 57 | 58 | WScript.Quit(intErrorCode) 59 | -------------------------------------------------------------------------------- /scripts/floppy/bginfo/win10/bgconfig.bgi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftEdge/dev.microsoftedge.com-vms/f61e112dc7bbb1ab8fce0e8a852237e090141a36/scripts/floppy/bginfo/win10/bgconfig.bgi -------------------------------------------------------------------------------- /scripts/floppy/common/finish-actions.ps1: -------------------------------------------------------------------------------- 1 | # -------------------------------------------------------------- 2 | # 3 | # dev.microsoftedge.com -VMs 4 | # Copyright(c) Microsoft Corporation. All rights reserved. 5 | # 6 | # MIT License 7 | # 8 | # Permission is hereby granted, free of charge, to any person obtaining 9 | # a copy of this software and associated documentation files(the ""Software""), 10 | # to deal in the Software without restriction, including without limitation the rights 11 | # to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies 12 | # of the Software, and to permit persons to whom the Software is furnished to do so, 13 | # subject to the following conditions : 14 | # 15 | # The above copyright notice and this permission notice shall be included 16 | # in all copies or substantial portions of the Software. 17 | # 18 | # THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 19 | # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 20 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS 21 | # OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 23 | # OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | # 25 | # -------------------------------------------------------------- 26 | 27 | 28 | [System.Reflection.Assembly]::LoadWithPartialName("System.Web.Extensions") 29 | $json = Get-Content "A:\build.cfg" 30 | $ser = New-Object System.Web.Script.Serialization.JavaScriptSerializer 31 | $config = $ser.DeserializeObject($json) 32 | $software = $config.software 33 | $windows = $config.windows 34 | copy a:\build.cfg C:\bginfo 35 | 36 | # Change Browsers Home Page 37 | & A:\browser-homepage.ps1 38 | 39 | # Start WinRM 40 | If ($windows -eq "Win10" -or $windows -eq "Win81") { 41 | & A:\start-winrm.ps1 42 | } 43 | 44 | # Copy SSH to execute 45 | copy a:\openssh.ps1 C:\bginfo 46 | 47 | $RegistryKey = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" 48 | $RegistryEntry = "FinishInstallActions" 49 | $ScriptPath = "c:\bginfo\openssh.ps1" 50 | 51 | Set-ItemProperty -Path $RegistryKey -Name $RegistryEntry -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy ByPass -File $($script:ScriptPath)" 52 | 53 | Restart-Computer -Force 54 | -------------------------------------------------------------------------------- /scripts/floppy/common/post-win-updates.ps1: -------------------------------------------------------------------------------- 1 | # -------------------------------------------------------------- 2 | # 3 | # dev.microsoftedge.com -VMs 4 | # Copyright(c) Microsoft Corporation. All rights reserved. 5 | # 6 | # MIT License 7 | # 8 | # Permission is hereby granted, free of charge, to any person obtaining 9 | # a copy of this software and associated documentation files(the ""Software""), 10 | # to deal in the Software without restriction, including without limitation the rights 11 | # to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies 12 | # of the Software, and to permit persons to whom the Software is furnished to do so, 13 | # subject to the following conditions : 14 | # 15 | # The above copyright notice and this permission notice shall be included 16 | # in all copies or substantial portions of the Software. 17 | # 18 | # THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 19 | # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 20 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS 21 | # OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 23 | # OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | # 25 | # -------------------------------------------------------------- 26 | 27 | $RegistryKey = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" 28 | $RegistryEntry = "FinishInstallActions" 29 | $ScriptPath = "A:\finish-actions.ps1" 30 | 31 | Set-ItemProperty -Path $RegistryKey -Name $RegistryEntry -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy ByPass -File $($script:ScriptPath)" 32 | 33 | Restart-Computer -Force -------------------------------------------------------------------------------- /scripts/floppy/common/preprovisioner.cmd: -------------------------------------------------------------------------------- 1 | REM -------------------------------------------------------------- 2 | REM 3 | REM dev.microsoftedge.com -VMs 4 | REM Copyright(c) Microsoft Corporation. All rights reserved. 5 | REM 6 | REM MIT License 7 | REM 8 | REM Permission is hereby granted, free of charge, to any person obtaining 9 | REM a copy of this software and associated documentation files(the ""Software""), 10 | REM to deal in the Software without restriction, including without limitation the rights 11 | REM to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies 12 | REM of the Software, and to permit persons to whom the Software is furnished to do so, 13 | REM subject to the following conditions : 14 | REM 15 | REM The above copyright notice and this permission notice shall be included 16 | REM in all copies or substantial portions of the Software. 17 | REM 18 | REM THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 19 | REM INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 20 | REM FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS 21 | REM OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | REM WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 23 | REM OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | REM 25 | REM -------------------------------------------------------------- 26 | 27 | @echo off 28 | setlocal EnableDelayedExpansion 29 | set c=0 30 | for /f "tokens=2 delims=:, " %%a in (' find ":" ^< "a:\build.cfg" ') do ( 31 | set /a c+=1 32 | set val[!c!]=%%~a 33 | ) 34 | for /L %%b in (1,1,!c!) do echo %%b !val[%%b]! 35 | 36 | IF %val[1]%==IE7 ( 37 | echo %val[2]% > a:\build.txt 38 | echo %val[1]% > a:\ie.txt 39 | echo %val[3]% > a:\software.txt 40 | ) 41 | 42 | IF [%1]==[FIRST] GOTO POWERSHELL 43 | IF [%1]==[SECOND] GOTO END 44 | IF %val[3]%==HyperV GOTO HYPERV 45 | GOTO POWERSHELL 46 | 47 | :HYPERV 48 | REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\0001" /v Entry1 /t REG_SZ /d "cmd.exe /c a:\preprovisioner.cmd FIRST" /f 49 | E:\support\x86\setup /quiet 50 | IF ERRORLEVEL 6001 shutdown /r /f /t 0 /c "server reboot" /d p:1:1 51 | GOTO END 52 | 53 | :POWERSHELL 54 | IF NOT %val[1]%==IE7 GOTO END 55 | REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\0001" /v Entry1 /t REG_SZ /d "cmd.exe /c a:\preprovisioner.cmd SECOND" /f 56 | bitsadmin /transfer myDownloadJob /download /priority normal http://download.microsoft.com/download/A/7/5/A75BC017-63CE-47D6-8FA4-AFB5C21BAC54/Windows6.0-KB968930-x86.msu c:\windows\temp\Windows6.0-KB968930-x86.msu 57 | wusa.exe c:\windows\temp\Windows6.0-KB968930-x86.msu /quiet 58 | 59 | :END 60 | C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy ByPass -File A:\preprovisioner.ps1 -Wait 61 | 62 | :NONE -------------------------------------------------------------------------------- /scripts/floppy/common/preprovisioner.ps1: -------------------------------------------------------------------------------- 1 | # -------------------------------------------------------------- 2 | # 3 | # dev.microsoftedge.com -VMs 4 | # Copyright(c) Microsoft Corporation. All rights reserved. 5 | # 6 | # MIT License 7 | # 8 | # Permission is hereby granted, free of charge, to any person obtaining 9 | # a copy of this software and associated documentation files(the ""Software""), 10 | # to deal in the Software without restriction, including without limitation the rights 11 | # to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies 12 | # of the Software, and to permit persons to whom the Software is furnished to do so, 13 | # subject to the following conditions : 14 | # 15 | # The above copyright notice and this permission notice shall be included 16 | # in all copies or substantial portions of the Software. 17 | # 18 | # THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 19 | # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 20 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS 21 | # OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 23 | # OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | # 25 | # -------------------------------------------------------------- 26 | 27 | param ( 28 | [Int]$IEBlocker = 0, 29 | [String]$IESetupUrl = "" 30 | ) 31 | 32 | # Install updates on the next restart 33 | $RegistryKey = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" 34 | $RegistryEntry = "InstallWindowsUpdates" 35 | $UpdateScriptPath = "a:\win-updates.ps1" 36 | Set-ItemProperty -Path $RegistryKey -Name $RegistryEntry -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy ByPass -File $($UpdateScriptPath)" 37 | 38 | # Set IEBlocker Registry Key 39 | 40 | [System.Reflection.Assembly]::LoadWithPartialName("System.Web.Extensions") 41 | $json = Get-Content "A:\build.cfg" 42 | $ser = New-Object System.Web.Script.Serialization.JavaScriptSerializer 43 | $config = $ser.DeserializeObject($json) 44 | 45 | $build = $config.build 46 | $windows = $config.windows 47 | $ie = $config.ie 48 | 49 | 50 | $ieNumber = $ie.Substring(2) 51 | $IEBlocker = [int]$IENumber + 1 52 | 53 | # Change Computer Name 54 | #Rename-Computer -NewName "$ie$windows" 55 | 56 | $IEBlocker8Key = "HKLM:\SOFTWARE\Microsoft\Internet Explorer\Setup\8.0" 57 | $IEBlocker8Value = "DoNotAllowIE80" 58 | 59 | $IEBlocker9Key = "HKLM:\SOFTWARE\Microsoft\Internet Explorer\Setup\9.0" 60 | $IEBlocker9Value = "DoNotAllowIE90" 61 | 62 | $IEBlocker10Key = "HKLM:\SOFTWARE\Microsoft\Internet Explorer\Setup\10.0" 63 | $IEBlocker10Value = "DoNotAllowIE10" 64 | 65 | $IEBlocker11Key = "HKLM:\SOFTWARE\Microsoft\Internet Explorer\Setup\11.0" 66 | $IEBlocker11Value = "DoNotAllowIE11" 67 | 68 | 69 | switch ($IEBlocker) { 70 | 7 { 71 | Write-Output "Blocking IE7-IE11" 72 | New-Item -Path $IEBlocker7Key -Force 73 | New-ItemProperty -Path $IEBlocker7Key -Name $IEBlocker7Value -PropertyType DWord -Value 1 -Force 74 | New-Item -Path $IEBlocker8Key -Force 75 | New-ItemProperty -Path $IEBlocker8Key -Name $IEBlocker8Value -PropertyType DWord -Value 1 -Force 76 | New-Item -Path $IEBlocker9Key -Force 77 | New-ItemProperty -Path $IEBlocker9Key -Name $IEBlocker9Value -PropertyType DWord -Value 1 -Force 78 | New-Item -Path $IEBlocker10Key -Force 79 | New-ItemProperty -Path $IEBlocker10Key -Name $IEBlocker10Value -PropertyType DWord -Value 1 -Force 80 | New-Item -Path $IEBlocker11Key -Force 81 | New-ItemProperty -Path $IEBlocker11Key -Name $IEBlocker11Value -PropertyType DWord -Value 1 -Force 82 | } 83 | 8 { 84 | Write-Output "Blocking IE8-IE11" 85 | New-Item -Path $IEBlocker8Key -Force 86 | New-ItemProperty -Path $IEBlocker8Key -Name $IEBlocker8Value -PropertyType DWord -Value 1 -Force 87 | New-Item -Path $IEBlocker9Key -Force 88 | New-ItemProperty -Path $IEBlocker9Key -Name $IEBlocker9Value -PropertyType DWord -Value 1 -Force 89 | New-Item -Path $IEBlocker10Key -Force 90 | New-ItemProperty -Path $IEBlocker10Key -Name $IEBlocker10Value -PropertyType DWord -Value 1 -Force 91 | New-Item -Path $IEBlocker11Key -Force 92 | New-ItemProperty -Path $IEBlocker11Key -Name $IEBlocker11Value -PropertyType DWord -Value 1 -Force 93 | } 94 | 9 { 95 | Write-Output "Blocking IE9-IE11" 96 | New-Item -Path $IEBlocker9Key -Force 97 | New-ItemProperty -Path $IEBlocker9Key -Name $IEBlocker9Value -PropertyType DWord -Value 1 -Force 98 | New-Item -Path $IEBlocker10Key -Force 99 | New-ItemProperty -Path $IEBlocker10Key -Name $IEBlocker10Value -PropertyType DWord -Value 1 -Force 100 | New-Item -Path $IEBlocker11Key -Force 101 | New-ItemProperty -Path $IEBlocker11Key -Name $IEBlocker11Value -PropertyType DWord -Value 1 -Force 102 | } 103 | 10 { 104 | Write-Output "Blocking IE10-IE11" 105 | New-Item -Path $IEBlocker10Key -Force 106 | New-ItemProperty -Path $IEBlocker10Key -Name $IEBlocker10Value -PropertyType DWord -Value 1 -Force 107 | New-Item -Path $IEBlocker11Key -Force 108 | New-ItemProperty -Path $IEBlocker11Key -Name $IEBlocker11Value -PropertyType DWord -Value 1 -Force 109 | } 110 | 11 { 111 | Write-Output "Blocking IE11" 112 | New-Item -Path $IEBlocker11Key -Force 113 | New-ItemProperty -Path $IEBlocker11Key -Name $IEBlocker11Value -PropertyType DWord -Value 1 -Force 114 | } 115 | 116 | 0 { 117 | Write-Output "IE Blocker not installed" 118 | } 119 | } 120 | 121 | # Copy EULA to system32 122 | Copy-Item A:\eula.txt C:\Windows\System32 123 | 124 | # Create EULA Shortcut 125 | $WshShell = New-Object -comObject WScript.Shell 126 | $Shortcut = $WshShell.CreateShortcut("$Home\Desktop\eula.lnk") 127 | $Shortcut.TargetPath = "C:\windows\system32\eula.txt" 128 | $Shortcut.Save() 129 | 130 | Restart-Computer -Force -------------------------------------------------------------------------------- /scripts/floppy/common/setautologon.ps1: -------------------------------------------------------------------------------- 1 | $RegPath = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" 2 | Set-ItemProperty $RegPath "AutoAdminLogon" -Value "1" -type String 3 | Set-ItemProperty $RegPath "DefaultPassword" -Value "Passw0rd!" -type String 4 | Set-ItemProperty $RegPath "AutoAdminLogonCount" -Value 20 -type DWord -------------------------------------------------------------------------------- /scripts/floppy/eula/win10/eula.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftEdge/dev.microsoftedge.com-vms/f61e112dc7bbb1ab8fce0e8a852237e090141a36/scripts/floppy/eula/win10/eula.txt -------------------------------------------------------------------------------- /scripts/floppy/eula/win7/eula.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftEdge/dev.microsoftedge.com-vms/f61e112dc7bbb1ab8fce0e8a852237e090141a36/scripts/floppy/eula/win7/eula.txt -------------------------------------------------------------------------------- /scripts/floppy/eula/win81/eula.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftEdge/dev.microsoftedge.com-vms/f61e112dc7bbb1ab8fce0e8a852237e090141a36/scripts/floppy/eula/win81/eula.txt -------------------------------------------------------------------------------- /scripts/floppy/homepage/browser-homepage.ps1: -------------------------------------------------------------------------------- 1 | # -------------------------------------------------------------- 2 | # 3 | # dev.microsoftedge.com -VMs 4 | # Copyright(c) Microsoft Corporation. All rights reserved. 5 | # 6 | # MIT License 7 | # 8 | # Permission is hereby granted, free of charge, to any person obtaining 9 | # a copy of this software and associated documentation files(the ""Software""), 10 | # to deal in the Software without restriction, including without limitation the rights 11 | # to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies 12 | # of the Software, and to permit persons to whom the Software is furnished to do so, 13 | # subject to the following conditions : 14 | # 15 | # The above copyright notice and this permission notice shall be included 16 | # in all copies or substantial portions of the Software. 17 | # 18 | # THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 19 | # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 20 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS 21 | # OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 23 | # OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | # 25 | # -------------------------------------------------------------- 26 | 27 | [System.Reflection.Assembly]::LoadWithPartialName("System.Web.Extensions") 28 | $json = Get-Content "A:\build.cfg" 29 | $ser = New-Object System.Web.Script.Serialization.JavaScriptSerializer 30 | $config = $ser.DeserializeObject($json) 31 | 32 | $build = $config.build 33 | $windows = $config.windows 34 | $ie = $config.ie 35 | 36 | $path = 'HKCU:\Software\Microsoft\Internet Explorer\Main\' 37 | $name = 'start page' 38 | $value = 'https://developer.microsoft.com/en-us/microsoft-edge/welcome/' + $windows + '/' + $ie + '/' + $build -------------------------------------------------------------------------------- /scripts/floppy/openssh/openssh.ps1: -------------------------------------------------------------------------------- 1 | # -------------------------------------------------------------- 2 | # 3 | # dev.microsoftedge.com -VMs 4 | # Copyright(c) Microsoft Corporation. All rights reserved. 5 | # 6 | # MIT License 7 | # 8 | # Permission is hereby granted, free of charge, to any person obtaining 9 | # a copy of this software and associated documentation files(the ""Software""), 10 | # to deal in the Software without restriction, including without limitation the rights 11 | # to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies 12 | # of the Software, and to permit persons to whom the Software is furnished to do so, 13 | # subject to the following conditions : 14 | # 15 | # The above copyright notice and this permission notice shall be included 16 | # in all copies or substantial portions of the Software. 17 | # 18 | # THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 19 | # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 20 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS 21 | # OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 23 | # OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | # 25 | # -------------------------------------------------------------- 26 | 27 | param ( 28 | [switch]$AutoStart = $false, 29 | [switch]$Finish = $false 30 | ) 31 | 32 | If (Test-Path c:\bginfo\software.txt) { 33 | $software = Get-Content c:\bginfo\software.txt 34 | $software = $software.Trim() 35 | } Else { 36 | [System.Reflection.Assembly]::LoadWithPartialName("System.Web.Extensions") 37 | $json = Get-Content "c:\bginfo\build.cfg" 38 | $ser = New-Object System.Web.Script.Serialization.JavaScriptSerializer 39 | $config = $ser.DeserializeObject($json) 40 | $software = $config.software 41 | } 42 | 43 | function DownloadSSH () { 44 | Write-Output "AutoStart: $AutoStart" 45 | $is_64bit = [IntPtr]::size -eq 8 46 | 47 | # setup openssh 48 | $ssh_download_url = "http://www.mls-software.com/files/setupssh-6.7p1-2.exe" 49 | 50 | if (!(Test-Path "C:\Program Files\OpenSSH\bin\ssh.exe")) { 51 | Write-Output "Downloading $ssh_download_url" 52 | (New-Object System.Net.WebClient).DownloadFile($ssh_download_url, "C:\Windows\Temp\openssh.exe") 53 | 54 | # initially set the port to 2222 so that there is not a race 55 | # condition in which packer connects to SSH before we can disable the service 56 | Start-Process "C:\Windows\Temp\openssh.exe" "/S /port=2222 /privsep=1 /password=D@rj33l1ng" -NoNewWindow -Wait 57 | } 58 | 59 | Stop-Service "OpenSSHd" -Force 60 | 61 | # ensure vagrant can log in 62 | Write-Output "Setting vagrant user file permissions" 63 | New-Item -ItemType Directory -Force -Path "C:\Users\IEUser\.ssh" 64 | C:\Windows\System32\icacls.exe "C:\Users\IEUser" /grant "IEUser:(OI)(CI)F" 65 | C:\Windows\System32\icacls.exe "C:\Program Files\OpenSSH\bin" /grant "IEUser:(OI)RX" 66 | C:\Windows\System32\icacls.exe "C:\Program Files\OpenSSH\usr\sbin" /grant "IEUser:(OI)RX" 67 | 68 | Write-Output "Setting SSH home directories" 69 | (Get-Content "C:\Program Files\OpenSSH\etc\passwd") | 70 | Foreach-Object { $_ -replace '/home/(\w+)', '/cygdrive/c/Users/$1' } | 71 | Set-Content 'C:\Program Files\OpenSSH\etc\passwd' 72 | 73 | # Set shell to /bin/sh to return exit status 74 | $passwd_file = Get-Content 'C:\Program Files\OpenSSH\etc\passwd' 75 | $passwd_file = $passwd_file -replace '/bin/bash', '/bin/sh' 76 | Set-Content 'C:\Program Files\OpenSSH\etc\passwd' $passwd_file 77 | 78 | # fix opensshd to not be strict 79 | Write-Output "Setting OpenSSH to be non-strict" 80 | $sshd_config = Get-Content "C:\Program Files\OpenSSH\etc\sshd_config" 81 | $sshd_config = $sshd_config -replace 'StrictModes yes', 'StrictModes no' 82 | $sshd_config = $sshd_config -replace '#PubkeyAuthentication yes', 'PubkeyAuthentication yes' 83 | $sshd_config = $sshd_config -replace '#PermitUserEnvironment no', 'PermitUserEnvironment yes' 84 | # disable the use of DNS to speed up the time it takes to establish a connection 85 | $sshd_config = $sshd_config -replace '#UseDNS yes', 'UseDNS no' 86 | # disable the login banner 87 | $sshd_config = $sshd_config -replace 'Banner /etc/banner.txt', '#Banner /etc/banner.txt' 88 | # next time OpenSSH starts have it listen on th eproper port 89 | $sshd_config = $sshd_config -replace 'Port 2222', "Port 22" 90 | Set-Content "C:\Program Files\OpenSSH\etc\sshd_config" $sshd_config 91 | 92 | Write-Output "Removing ed25519 key as Vagrant net-ssh 2.9.1 does not support it" 93 | Remove-Item -Force -ErrorAction SilentlyContinue "C:\Program Files\OpenSSH\etc\ssh_host_ed25519_key" 94 | Remove-Item -Force -ErrorAction SilentlyContinue "C:\Program Files\OpenSSH\etc\ssh_host_ed25519_key.pub" 95 | 96 | # use c:\Windows\Temp as /tmp location 97 | Write-Output "Setting temp directory location" 98 | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue "C:\Program Files\OpenSSH\tmp" 99 | C:\Program` Files\OpenSSH\bin\junction.exe /accepteula "C:\Program Files\OpenSSH\tmp" "C:\Windows\Temp" 100 | C:\Windows\System32\icacls.exe "C:\Windows\Temp" /grant "IEUser:(OI)(CI)F" 101 | 102 | # add 64 bit environment variables missing from SSH 103 | Write-Output "Setting SSH environment" 104 | $sshenv = "TEMP=C:\Windows\Temp" 105 | if ($is_64bit) { 106 | $env_vars = "ProgramFiles(x86)=C:\Program Files (x86)", ` 107 | "ProgramW6432=C:\Program Files", ` 108 | "CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files", ` 109 | "CommonProgramW6432=C:\Program Files\Common Files" 110 | $sshenv = $sshenv + "`r`n" + ($env_vars -join "`r`n") 111 | } 112 | Set-Content C:\Users\IEUser\.ssh\environment $sshenv 113 | 114 | # record the path for provisioners (without the newline) 115 | Write-Output "Recording PATH for provisioners" 116 | Set-Content C:\Windows\Temp\PATH ([byte[]][char[]] $env:PATH) -Encoding Byte 117 | 118 | # configure firewall 119 | Write-Output "Configuring firewall" 120 | netsh advfirewall firewall add rule name="SSHD" dir=in action=allow service=OpenSSHd enable=yes 121 | netsh advfirewall firewall add rule name="SSHD" dir=in action=allow program="C:\Program Files\OpenSSH\usr\sbin\sshd.exe" enable=yes 122 | netsh advfirewall firewall add rule name="ssh" dir=in action=allow protocol=TCP localport=22 123 | 124 | # Enable UAC 125 | #New-ItemProperty -Path HKLM:Software\Microsoft\Windows\CurrentVersion\policies\system -Name EnableLUA -PropertyType DWord -Value 1 -Force 126 | 127 | $RegistryKey = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" 128 | $RegistryEntry = "FinishInstallActions" 129 | $ScriptPath = "c:\bginfo\openssh.ps1 -Finish" 130 | 131 | Set-ItemProperty -Path $RegistryKey -Name $RegistryEntry -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy ByPass -File $($ScriptPath)" 132 | 133 | Restart-Computer -Force 134 | } 135 | 136 | function OpenSSH () { 137 | #Start-Service "OpenSSHd" 138 | 139 | # If ($software -eq "HyperV" -or $software -eq "VPC") { 140 | # Stop-Computer -Force 141 | # } 142 | } 143 | 144 | If ($Finish -eq $true) { 145 | OpenSSH 146 | } Else { 147 | DownloadSSH 148 | } 149 | 150 | -------------------------------------------------------------------------------- /scripts/floppy/powershell/download.vbs: -------------------------------------------------------------------------------- 1 | '-------------------------------------------------------------- 2 | ' 3 | ' dev.microsoftedge.com -VMs 4 | ' Copyright(c) Microsoft Corporation. All rights reserved. 5 | ' 6 | ' MIT License 7 | ' 8 | ' Permission is hereby granted, free of charge, to any person obtaining 9 | ' a copy of this software and associated documentation files(the ""Software""), 10 | ' to deal in the Software without restriction, including without limitation the rights 11 | ' to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies 12 | ' of the Software, and to permit persons to whom the Software is furnished to do so, 13 | ' subject to the following conditions : 14 | ' 15 | ' The above copyright notice and this permission notice shall be included 16 | ' in all copies or substantial portions of the Software. 17 | ' 18 | ' THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 19 | ' INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 20 | ' FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS 21 | ' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | ' WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 23 | ' OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | ' 25 | '-------------------------------------------------------------- 26 | 27 | ' Set your settings 28 | strFileURL = "http://download.microsoft.com/download/A/7/5/A75BC017-63CE-47D6-8FA4-AFB5C21BAC54/Windows6.0-KB968930-x86.msu" 29 | strHDLocation = "c:\windows\temp\Windows6.0-KB968930-x86.msu" 30 | 31 | ' Fetch the file 32 | Set objXMLHTTP = CreateObject("MSXML2.XMLHTTP") 33 | 34 | objXMLHTTP.open "GET", strFileURL, false 35 | objXMLHTTP.send() 36 | 37 | If objXMLHTTP.Status = 200 Then 38 | Set objADOStream = CreateObject("ADODB.Stream") 39 | objADOStream.Open 40 | objADOStream.Type = 1 'adTypeBinary 41 | 42 | objADOStream.Write objXMLHTTP.ResponseBody 43 | objADOStream.Position = 0 'Set the stream position to the start 44 | 45 | Set objFSO = Createobject("Scripting.FileSystemObject") 46 | If objFSO.Fileexists(strHDLocation) Then objFSO.DeleteFile strHDLocation 47 | Set objFSO = Nothing 48 | 49 | objADOStream.SaveToFile strHDLocation 50 | objADOStream.Close 51 | Set objADOStream = Nothing 52 | End if 53 | 54 | Set objXMLHTTP = Nothing -------------------------------------------------------------------------------- /scripts/floppy/powershell/powershell.cmd: -------------------------------------------------------------------------------- 1 | REM -------------------------------------------------------------- 2 | REM 3 | REM dev.microsoftedge.com -VMs 4 | REM Copyright(c) Microsoft Corporation. All rights reserved. 5 | REM 6 | REM MIT License 7 | REM 8 | REM Permission is hereby granted, free of charge, to any person obtaining 9 | REM a copy of this software and associated documentation files(the ""Software""), 10 | REM to deal in the Software without restriction, including without limitation the rights 11 | REM to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies 12 | REM of the Software, and to permit persons to whom the Software is furnished to do so, 13 | REM subject to the following conditions : 14 | REM 15 | REM The above copyright notice and this permission notice shall be included 16 | REM in all copies or substantial portions of the Software. 17 | REM 18 | REM THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 19 | REM INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 20 | REM FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS 21 | REM OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | REM WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 23 | REM OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | REM 25 | REM -------------------------------------------------------------- 26 | 27 | if not exist "C:\Windows\Temp\Windows6.0-KB968930-x86.msu" ( 28 | cscript download.vbs 29 | ) 30 | wusa.exe C:\Windows\Temp\Windows6.0-KB968930-x86.msu /quiet /mrestart -------------------------------------------------------------------------------- /scripts/floppy/updates/microsoft-updates.bat: -------------------------------------------------------------------------------- 1 | REM -------------------------------------------------------------- 2 | REM 3 | REM dev.microsoftedge.com -VMs 4 | REM Copyright(c) Microsoft Corporation. All rights reserved. 5 | REM 6 | REM MIT License 7 | REM 8 | REM Permission is hereby granted, free of charge, to any person obtaining 9 | REM a copy of this software and associated documentation files(the ""Software""), 10 | REM to deal in the Software without restriction, including without limitation the rights 11 | REM to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies 12 | REM of the Software, and to permit persons to whom the Software is furnished to do so, 13 | REM subject to the following conditions : 14 | REM 15 | REM The above copyright notice and this permission notice shall be included 16 | REM in all copies or substantial portions of the Software. 17 | REM 18 | REM THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 19 | REM INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 20 | REM FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS 21 | REM OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | REM WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 23 | REM OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | REM 25 | REM -------------------------------------------------------------- 26 | 27 | net stop wuauserv 28 | 29 | reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v EnableFeaturedSoftware /t REG_DWORD /d 1 /f 30 | 31 | reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v IncludeRecommendedUpdates /t REG_DWORD /d 1 /f 32 | 33 | echo Set ServiceManager = CreateObject("Microsoft.Update.ServiceManager") > A:\temp.vbs 34 | echo Set NewUpdateService = ServiceManager.AddService2("7971f918-a847-4430-9279-4a52d1efe18d",7,"") >> A:\temp.vbs 35 | 36 | cscript A:\temp.vbs 37 | 38 | net start wuauserv -------------------------------------------------------------------------------- /scripts/floppy/updates/win-updates-fake.ps1: -------------------------------------------------------------------------------- 1 | # -------------------------------------------------------------- 2 | # 3 | # dev.microsoftedge.com -VMs 4 | # Copyright(c) Microsoft Corporation. All rights reserved. 5 | # 6 | # MIT License 7 | # 8 | # Permission is hereby granted, free of charge, to any person obtaining 9 | # a copy of this software and associated documentation files(the ""Software""), 10 | # to deal in the Software without restriction, including without limitation the rights 11 | # to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies 12 | # of the Software, and to permit persons to whom the Software is furnished to do so, 13 | # subject to the following conditions : 14 | # 15 | # The above copyright notice and this permission notice shall be included 16 | # in all copies or substantial portions of the Software. 17 | # 18 | # THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 19 | # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 20 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS 21 | # OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 23 | # OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | # 25 | # -------------------------------------------------------------- 26 | 27 | Write-Host "Fake installing... Waiting 20s" 28 | 29 | Start-Sleep -s 20 30 | 31 | $RegistryKey = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" 32 | $RegistryEntry = "InstallWindowsUpdates" 33 | $prop = (Get-ItemProperty $RegistryKey).$RegistryEntry 34 | Remove-ItemProperty -Path $RegistryKey -Name $RegistryEntry -ErrorAction SilentlyContinue 35 | 36 | & A:\post-win-updates.ps1 -------------------------------------------------------------------------------- /scripts/floppy/updates/win-updates.ps1: -------------------------------------------------------------------------------- 1 | # -------------------------------------------------------------- 2 | # 3 | # dev.microsoftedge.com -VMs 4 | # Copyright(c) Microsoft Corporation. All rights reserved. 5 | # 6 | # MIT License 7 | # 8 | # Permission is hereby granted, free of charge, to any person obtaining 9 | # a copy of this software and associated documentation files(the ""Software""), 10 | # to deal in the Software without restriction, including without limitation the rights 11 | # to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies 12 | # of the Software, and to permit persons to whom the Software is furnished to do so, 13 | # subject to the following conditions : 14 | # 15 | # The above copyright notice and this permission notice shall be included 16 | # in all copies or substantial portions of the Software. 17 | # 18 | # THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 19 | # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 20 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS 21 | # OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 23 | # OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | # 25 | # -------------------------------------------------------------- 26 | 27 | 28 | param($global:RestartRequired=0, 29 | $global:MoreUpdates=0, 30 | $global:MaxCycles=5, 31 | $MaxUpdatesPerCycle=500) 32 | 33 | $Logfile = "C:\Windows\Temp\win-updates.log" 34 | 35 | function LogWrite { 36 | Param ([string]$logstring) 37 | $now = Get-Date -format s 38 | Add-Content $Logfile -value "$now $logstring" 39 | Write-Host $logstring 40 | } 41 | 42 | function Check-ContinueRestartOrEnd() { 43 | $RegistryKey = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" 44 | $RegistryEntry = "InstallWindowsUpdates" 45 | switch ($global:RestartRequired) { 46 | 0 { 47 | $prop = (Get-ItemProperty $RegistryKey).$RegistryEntry 48 | if ($prop) { 49 | LogWrite "Restart Registry Entry Exists - Removing It" 50 | Remove-ItemProperty -Path $RegistryKey -Name $RegistryEntry -ErrorAction SilentlyContinue 51 | } 52 | 53 | LogWrite "No Restart Required" 54 | Check-WindowsUpdates 55 | 56 | if (($global:MoreUpdates -eq 1) -and ($script:Cycles -le $global:MaxCycles)) { 57 | Install-WindowsUpdates 58 | } elseif ($script:Cycles -gt $global:MaxCycles) { 59 | LogWrite "Exceeded Cycle Count - Stopping" 60 | Invoke-Expression "a:\post-win-updates.ps1" 61 | } else { 62 | LogWrite "Done Installing Windows Updates" 63 | Invoke-Expression "a:\post-win-updates.ps1" 64 | } 65 | } 66 | 1 { 67 | $prop = (Get-ItemProperty $RegistryKey).$RegistryEntry 68 | if (-not $prop) { 69 | LogWrite "Restart Registry Entry Does Not Exist - Creating It" 70 | Set-ItemProperty -Path $RegistryKey -Name $RegistryEntry -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File $($script:ScriptPath) -MaxUpdatesPerCycle $($MaxUpdatesPerCycle)" 71 | } else { 72 | LogWrite "Restart Registry Entry Exists Already" 73 | } 74 | 75 | LogWrite "Restart Required - Restarting..." 76 | Restart-Computer 77 | } 78 | default { 79 | LogWrite "Unsure If A Restart Is Required" 80 | break 81 | } 82 | } 83 | } 84 | 85 | function Install-WindowsUpdates() { 86 | $script:Cycles++ 87 | LogWrite "Evaluating Available Updates with limit of $($MaxUpdatesPerCycle):" 88 | $UpdatesToDownload = New-Object -ComObject 'Microsoft.Update.UpdateColl' 89 | $script:i = 0; 90 | $CurrentUpdates = $SearchResult.Updates 91 | while($script:i -lt $CurrentUpdates.Count -and $script:CycleUpdateCount -lt $MaxUpdatesPerCycle) { 92 | $Update = $CurrentUpdates.Item($script:i) 93 | if (($Update -ne $null) -and (!$Update.IsDownloaded)) { 94 | [bool]$addThisUpdate = $false 95 | if ($Update.InstallationBehavior.CanRequestUserInput) { 96 | LogWrite "> Skipping: $($Update.Title) because it requires user input" 97 | } else { 98 | if (!($Update.EulaAccepted)) { 99 | LogWrite "> Note: $($Update.Title) has a license agreement that must be accepted. Accepting the license." 100 | $Update.AcceptEula() 101 | [bool]$addThisUpdate = $true 102 | $script:CycleUpdateCount++ 103 | } else { 104 | [bool]$addThisUpdate = $true 105 | $script:CycleUpdateCount++ 106 | } 107 | } 108 | 109 | if ([bool]$addThisUpdate) { 110 | LogWrite "Adding: $($Update.Title)" 111 | $UpdatesToDownload.Add($Update) |Out-Null 112 | } 113 | } 114 | $script:i++ 115 | } 116 | 117 | if ($UpdatesToDownload.Count -eq 0) { 118 | LogWrite "No Updates To Download..." 119 | } else { 120 | LogWrite 'Downloading Updates...' 121 | $ok = 0; 122 | while (! $ok) { 123 | try { 124 | $Downloader = $UpdateSession.CreateUpdateDownloader() 125 | $Downloader.Updates = $UpdatesToDownload 126 | $Downloader.Download() 127 | $ok = 1; 128 | } catch { 129 | LogWrite $_.Exception | Format-List -force 130 | LogWrite "Error downloading updates. Retrying in 30s." 131 | $script:attempts = $script:attempts + 1 132 | Start-Sleep -s 30 133 | } 134 | } 135 | } 136 | 137 | $UpdatesToInstall = New-Object -ComObject 'Microsoft.Update.UpdateColl' 138 | [bool]$rebootMayBeRequired = $false 139 | LogWrite 'The following updates are downloaded and ready to be installed:' 140 | foreach ($Update in $SearchResult.Updates) { 141 | if (($Update.IsDownloaded)) { 142 | LogWrite "> $($Update.Title)" 143 | $UpdatesToInstall.Add($Update) |Out-Null 144 | 145 | if ($Update.InstallationBehavior.RebootBehavior -gt 0){ 146 | [bool]$rebootMayBeRequired = $true 147 | } 148 | } 149 | } 150 | 151 | if ($UpdatesToInstall.Count -eq 0) { 152 | LogWrite 'No updates available to install...' 153 | $global:MoreUpdates=0 154 | $global:RestartRequired=0 155 | 156 | $RegistryKey = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" 157 | $RegistryEntry = "InstallWindowsUpdates" 158 | $prop = (Get-ItemProperty $RegistryKey).$RegistryEntry 159 | if ($prop) { 160 | LogWrite "Restart Registry Entry Exists - Removing It" 161 | Remove-ItemProperty -Path $RegistryKey -Name $RegistryEntry -ErrorAction SilentlyContinue 162 | } 163 | 164 | Invoke-Expression "a:\post-win-updates.ps1" 165 | break 166 | } 167 | 168 | if ($rebootMayBeRequired) { 169 | LogWrite 'These updates may require a reboot' 170 | $global:RestartRequired=1 171 | } 172 | 173 | LogWrite 'Installing updates...' 174 | 175 | $Installer = $script:UpdateSession.CreateUpdateInstaller() 176 | $Installer.Updates = $UpdatesToInstall 177 | $InstallationResult = $Installer.Install() 178 | 179 | LogWrite "Installation Result: $($InstallationResult.ResultCode)" 180 | LogWrite "Reboot Required: $($InstallationResult.RebootRequired)" 181 | LogWrite 'Listing of updates installed and individual installation results:' 182 | if ($InstallationResult.RebootRequired) { 183 | $global:RestartRequired=1 184 | } else { 185 | $global:RestartRequired=0 186 | } 187 | 188 | for($i=0; $i -lt $UpdatesToInstall.Count; $i++) { 189 | New-Object -TypeName PSObject -Property @{ 190 | Title = $UpdatesToInstall.Item($i).Title 191 | Result = $InstallationResult.GetUpdateResult($i).ResultCode 192 | } 193 | LogWrite "Item: " $UpdatesToInstall.Item($i).Title 194 | LogWrite "Result: " $InstallationResult.GetUpdateResult($i).ResultCode; 195 | } 196 | 197 | Check-ContinueRestartOrEnd 198 | } 199 | 200 | function Check-WindowsUpdates() { 201 | LogWrite "Checking For Windows Updates" 202 | $Username = $env:USERDOMAIN + "\" + $env:USERNAME 203 | 204 | New-EventLog -Source $ScriptName -LogName 'Windows Powershell' -ErrorAction SilentlyContinue 205 | 206 | $Message = "Script: " + $ScriptPath + "`nScript User: " + $Username + "`nStarted: " + (Get-Date).toString() 207 | 208 | Write-EventLog -LogName 'Windows Powershell' -Source $ScriptName -EventID "104" -EntryType "Information" -Message $Message 209 | LogWrite $Message 210 | 211 | $script:UpdateSearcher = $script:UpdateSession.CreateUpdateSearcher() 212 | $script:successful = $FALSE 213 | $script:attempts = 0 214 | $script:maxAttempts = 12 215 | while(-not $script:successful -and $script:attempts -lt $script:maxAttempts) { 216 | try { 217 | $script:SearchResult = $script:UpdateSearcher.Search("IsInstalled=0 and Type='Software' and IsHidden=0") 218 | $script:successful = $TRUE 219 | } catch { 220 | LogWrite $_.Exception | Format-List -force 221 | LogWrite "Search call to UpdateSearcher was unsuccessful. Retrying in 10s." 222 | $script:attempts = $script:attempts + 1 223 | Start-Sleep -s 10 224 | } 225 | } 226 | 227 | if ($SearchResult.Updates.Count -ne 0) { 228 | $Message = "There are " + $SearchResult.Updates.Count + " more updates." 229 | LogWrite $Message 230 | try { 231 | for($i=0; $i -lt $script:SearchResult.Updates.Count; $i++) { 232 | LogWrite $script:SearchResult.Updates.Item($i).Title 233 | LogWrite $script:SearchResult.Updates.Item($i).Description 234 | LogWrite $script:SearchResult.Updates.Item($i).RebootRequired 235 | LogWrite $script:SearchResult.Updates.Item($i).EulaAccepted 236 | } 237 | $global:MoreUpdates=1 238 | } catch { 239 | LogWrite $_.Exception | Format-List -force 240 | LogWrite "Showing SearchResult was unsuccessful. Rebooting." 241 | $global:RestartRequired=1 242 | $global:MoreUpdates=0 243 | Check-ContinueRestartOrEnd 244 | LogWrite "Show never happen to see this text!" 245 | Restart-Computer 246 | } 247 | } else { 248 | LogWrite 'There are no applicable updates' 249 | $global:RestartRequired=0 250 | $global:MoreUpdates=0 251 | } 252 | } 253 | 254 | $script:ScriptName = $MyInvocation.MyCommand.ToString() 255 | $script:ScriptPath = $MyInvocation.MyCommand.Path 256 | $script:UpdateSession = New-Object -ComObject 'Microsoft.Update.Session' 257 | $script:UpdateSession.ClientApplicationID = 'Packer Windows Update Installer' 258 | $script:UpdateSearcher = $script:UpdateSession.CreateUpdateSearcher() 259 | $script:SearchResult = New-Object -ComObject 'Microsoft.Update.UpdateColl' 260 | $script:Cycles = 0 261 | $script:CycleUpdateCount = 0 262 | 263 | Check-WindowsUpdates 264 | if ($global:MoreUpdates -eq 1) { 265 | Install-WindowsUpdates 266 | } else { 267 | Check-ContinueRestartOrEnd 268 | } -------------------------------------------------------------------------------- /scripts/floppy/winrm/config-winrm.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | REM -------------------------------------------------------------- 3 | REM 4 | REM dev.microsoftedge.com -VMs 5 | REM Copyright(c) Microsoft Corporation. All rights reserved. 6 | REM 7 | REM MIT License 8 | REM 9 | REM Permission is hereby granted, free of charge, to any person obtaining 10 | REM a copy of this software and associated documentation files(the ""Software""), 11 | REM to deal in the Software without restriction, including without limitation the rights 12 | REM to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies 13 | REM of the Software, and to permit persons to whom the Software is furnished to do so, 14 | REM subject to the following conditions : 15 | REM 16 | REM The above copyright notice and this permission notice shall be included 17 | REM in all copies or substantial portions of the Software. 18 | REM 19 | REM THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 20 | REM INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 21 | REM FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS 22 | REM OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 23 | REM WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 24 | REM OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 | REM 26 | REM -------------------------------------------------------------- 27 | 28 | set WINRM_EXEC=call %SYSTEMROOT%\System32\winrm 29 | %WINRM_EXEC% quickconfig -q 30 | %WINRM_EXEC% set winrm/config/winrs @{MaxMemoryPerShellMB="300"} 31 | %WINRM_EXEC% set winrm/config @{MaxTimeoutms="1800000"} 32 | %WINRM_EXEC% set winrm/config/client/auth @{Basic="true"} 33 | %WINRM_EXEC% set winrm/config/service @{AllowUnencrypted="true"} 34 | %WINRM_EXEC% set winrm/config/service/auth @{Basic="true"} 35 | 36 | @powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin 37 | choco install -y puppet 38 | -------------------------------------------------------------------------------- /scripts/floppy/winrm/start-winrm.ps1: -------------------------------------------------------------------------------- 1 | # -------------------------------------------------------------- 2 | # 3 | # dev.microsoftedge.com -VMs 4 | # Copyright(c) Microsoft Corporation. All rights reserved. 5 | # 6 | # MIT License 7 | # 8 | # Permission is hereby granted, free of charge, to any person obtaining 9 | # a copy of this software and associated documentation files(the ""Software""), 10 | # to deal in the Software without restriction, including without limitation the rights 11 | # to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies 12 | # of the Software, and to permit persons to whom the Software is furnished to do so, 13 | # subject to the following conditions : 14 | # 15 | # The above copyright notice and this permission notice shall be included 16 | # in all copies or substantial portions of the Software. 17 | # 18 | # THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 19 | # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 20 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS 21 | # OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 23 | # OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | # 25 | # -------------------------------------------------------------- 26 | 27 | $networkListManager = [Activator]::CreateInstance([Type]::GetTypeFromCLSID([Guid]"{DCB00C01-570F-4A9B-8D69-199FDBA5723B}")) 28 | $connections = $networkListManager.GetNetworkConnections() 29 | $connections | % {$_.GetNetwork().SetCategory(1)} 30 | 31 | & a:\config-winrm.cmd 32 | -------------------------------------------------------------------------------- /scripts/iso/readme.md: -------------------------------------------------------------------------------- 1 | ISOs must be placed here in order to run packer scripts in local -------------------------------------------------------------------------------- /scripts/provisioners/compact.bat: -------------------------------------------------------------------------------- 1 | REM -------------------------------------------------------------- 2 | REM 3 | REM dev.microsoftedge.com -VMs 4 | REM Copyright(c) Microsoft Corporation. All rights reserved. 5 | REM 6 | REM MIT License 7 | REM 8 | REM Permission is hereby granted, free of charge, to any person obtaining 9 | REM a copy of this software and associated documentation files(the ""Software""), 10 | REM to deal in the Software without restriction, including without limitation the rights 11 | REM to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies 12 | REM of the Software, and to permit persons to whom the Software is furnished to do so, 13 | REM subject to the following conditions : 14 | REM 15 | REM The above copyright notice and this permission notice shall be included 16 | REM in all copies or substantial portions of the Software. 17 | REM 18 | REM THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 19 | REM INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 20 | REM FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS 21 | REM OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | REM WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 23 | REM OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | REM 25 | REM -------------------------------------------------------------- 26 | if not exist "C:\Windows\Temp\7z920.msi" (powershell -Command "(New-Object System.Net.WebClient).DownloadFile('http://www.7-zip.org/a/7z920.msi', 'C:\Windows\Temp\7z920.msi')" <NUL 27 | ) 28 | 29 | msiexec /qb /i C:\Windows\Temp\7z920.msi 30 | 31 | if not exist "C:\Windows\Temp\ultradefrag.zip" ( 32 | powershell -Command "(New-Object System.Net.WebClient).DownloadFile('http://downloads.sourceforge.net/project/ultradefrag/stable-release/6.1.0/ultradefrag-portable-6.1.0.bin.i386.zip', 'C:\Windows\Temp\ultradefrag.zip')" <NUL 33 | ) 34 | 35 | if not exist "C:\Windows\Temp\ultradefrag-portable-6.1.0.i386\udefrag.exe" ( 36 | cmd /c ""C:\Program Files ^(x86^)\7-Zip\7z.exe" x C:\Windows\Temp\ultradefrag.zip -oC:\Windows\Temp" 37 | ) 38 | 39 | if not exist "C:\Windows\Temp\SDelete.zip" ( 40 | powershell -Command "(New-Object System.Net.WebClient).DownloadFile('http://download.sysinternals.com/files/SDelete.zip', 'C:\Windows\Temp\SDelete.zip')" <NUL 41 | ) 42 | 43 | if not exist "C:\Windows\Temp\sdelete.exe" ( 44 | cmd /c ""C:\Program Files ^(x86^)\7-Zip\7z.exe" x C:\Windows\Temp\SDelete.zip -oC:\Windows\Temp" 45 | ) 46 | 47 | msiexec /qb /x C:\Windows\Temp\7z920.msi 48 | 49 | net stop wuauserv 50 | rmdir /S /Q C:\Windows\SoftwareDistribution\Download 51 | mkdir C:\Windows\SoftwareDistribution\Download 52 | net start wuauserv 53 | 54 | cmd /c C:\Windows\Temp\ultradefrag-portable-6.1.0.i386\udefrag.exe --optimize --repeat C: 55 | 56 | cmd /c %SystemRoot%\System32\reg.exe ADD HKCU\Software\Sysinternals\SDelete /v EulaAccepted /t REG_DWORD /d 1 /f 57 | cmd /c C:\Windows\Temp\sdelete.exe -q -z C: 58 | 59 | exit /b 0 -------------------------------------------------------------------------------- /scripts/provisioners/compactx86.bat: -------------------------------------------------------------------------------- 1 | REM -------------------------------------------------------------- 2 | REM 3 | REM dev.microsoftedge.com -VMs 4 | REM Copyright(c) Microsoft Corporation. All rights reserved. 5 | REM 6 | REM MIT License 7 | REM 8 | REM Permission is hereby granted, free of charge, to any person obtaining 9 | REM a copy of this software and associated documentation files(the ""Software""), 10 | REM to deal in the Software without restriction, including without limitation the rights 11 | REM to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies 12 | REM of the Software, and to permit persons to whom the Software is furnished to do so, 13 | REM subject to the following conditions : 14 | REM 15 | REM The above copyright notice and this permission notice shall be included 16 | REM in all copies or substantial portions of the Software. 17 | REM 18 | REM THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 19 | REM INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 20 | REM FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS 21 | REM OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | REM WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 23 | REM OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | REM 25 | REM -------------------------------------------------------------- 26 | if not exist "C:\Windows\Temp\7z920.msi" (powershell -Command "(New-Object System.Net.WebClient).DownloadFile('http://www.7-zip.org/a/7z920.msi', 'C:\Windows\Temp\7z920.msi')" <NUL 27 | ) 28 | 29 | msiexec /qb /i C:\Windows\Temp\7z920.msi 30 | 31 | if not exist "C:\Windows\Temp\ultradefrag.zip" ( 32 | powershell -Command "(New-Object System.Net.WebClient).DownloadFile('http://downloads.sourceforge.net/project/ultradefrag/stable-release/6.1.0/ultradefrag-portable-6.1.0.bin.i386.zip', 'C:\Windows\Temp\ultradefrag.zip')" <NUL 33 | ) 34 | 35 | if not exist "C:\Windows\Temp\ultradefrag-portable-6.1.0.i386\udefrag.exe" ( 36 | cmd /c ""C:\Program Files\7-Zip\7z.exe" x C:\Windows\Temp\ultradefrag.zip -oC:\Windows\Temp" 37 | ) 38 | 39 | if not exist "C:\Windows\Temp\SDelete.zip" ( 40 | powershell -Command "(New-Object System.Net.WebClient).DownloadFile('http://download.sysinternals.com/files/SDelete.zip', 'C:\Windows\Temp\SDelete.zip')" <NUL 41 | ) 42 | 43 | if not exist "C:\Windows\Temp\sdelete.exe" ( 44 | cmd /c ""C:\Program Files\7-Zip\7z.exe" x C:\Windows\Temp\SDelete.zip -oC:\Windows\Temp" 45 | ) 46 | 47 | msiexec /qb /x C:\Windows\Temp\7z920.msi 48 | 49 | net stop wuauserv 50 | rmdir /S /Q C:\Windows\SoftwareDistribution\Download 51 | mkdir C:\Windows\SoftwareDistribution\Download 52 | net start wuauserv 53 | 54 | cmd /c C:\Windows\Temp\ultradefrag-portable-6.1.0.i386\udefrag.exe --optimize --repeat C: 55 | 56 | cmd /c %SystemRoot%\System32\reg.exe ADD HKCU\Software\Sysinternals\SDelete /v EulaAccepted /t REG_DWORD /d 1 /f 57 | cmd /c C:\Windows\Temp\sdelete.exe -q -z C: 58 | 59 | exit /b 0 -------------------------------------------------------------------------------- /scripts/provisioners/disable-autologon.bat: -------------------------------------------------------------------------------- 1 | cmd /c %windir%\System32\reg.exe ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /t REG_SZ /d "0" /f -------------------------------------------------------------------------------- /scripts/provisioners/ie_setup_runner.cmd: -------------------------------------------------------------------------------- 1 | REM -------------------------------------------------------------- 2 | REM 3 | REM dev.microsoftedge.com -VMs 4 | REM Copyright(c) Microsoft Corporation. All rights reserved. 5 | REM 6 | REM MIT License 7 | REM 8 | REM Permission is hereby granted, free of charge, to any person obtaining 9 | REM a copy of this software and associated documentation files(the ""Software""), 10 | REM to deal in the Software without restriction, including without limitation the rights 11 | REM to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies 12 | REM of the Software, and to permit persons to whom the Software is furnished to do so, 13 | REM subject to the following conditions : 14 | REM 15 | REM The above copyright notice and this permission notice shall be included 16 | REM in all copies or substantial portions of the Software. 17 | REM 18 | REM THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 19 | REM INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 20 | REM FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS 21 | REM OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | REM WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 23 | REM OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | REM 25 | REM -------------------------------------------------------------- 26 | echo Downloading %1 27 | bitsadmin /transfer myDownloadJob /download /priority normal %1 c:\windows\temp\setup_ie.exe 28 | echo running c:\windows\temp\setup_ie.exe %2 %3 %4 %5 %6 29 | c:\windows\temp\setup_ie.exe %2 %3 %4 %5 %6 30 | echo setup finished... deleting file 31 | del c:\windows\temp\setup_ie.exe /F /Q 32 | echo IE Setup executed -------------------------------------------------------------------------------- /scripts/provisioners/ie_setup_runner.ps1: -------------------------------------------------------------------------------- 1 | # -------------------------------------------------------------- 2 | # 3 | # dev.microsoftedge.com -VMs 4 | # Copyright(c) Microsoft Corporation. All rights reserved. 5 | # 6 | # MIT License 7 | # 8 | # Permission is hereby granted, free of charge, to any person obtaining 9 | # a copy of this software and associated documentation files(the ""Software""), 10 | # to deal in the Software without restriction, including without limitation the rights 11 | # to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies 12 | # of the Software, and to permit persons to whom the Software is furnished to do so, 13 | # subject to the following conditions : 14 | # 15 | # The above copyright notice and this permission notice shall be included 16 | # in all copies or substantial portions of the Software. 17 | # 18 | # THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 19 | # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 20 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS 21 | # OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 23 | # OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | # 25 | # -------------------------------------------------------------- 26 | 27 | param([string]$uri) 28 | 29 | C:\Windows\System32\icacls.exe "C:\Users\IEUser" /grant "IEUser:(OI)(CI)F" 30 | C:\Windows\System32\icacls.exe "C:\windows\temp" /grant "IEUser:(OI)RX" 31 | C:\Windows\System32\icacls.exe "C:\windows\temp" /grant "IEUser:(OI)RX" 32 | Write-Output "Downloading IE SETUP from $uri" 33 | (New-Object System.Net.WebClient).DownloadFile($uri, "C:\Windows\Temp\ie_setup.exe") 34 | Write-Output "Running ie_setup..." 35 | $iesetup = "C:\Windows\Temp\ie_setup.exe" 36 | $arguments = "/quiet /update-no /closeprograms /log:c:\windows\temp /norestart" 37 | $password = "Passw0rd!" | ConvertTo-SecureString -asPlainText -F 38 | $username = ".\IEUser" 39 | $credentials = New-Object System.Management.Automation.PSCredential($username,$password) 40 | Start-Process $iesetup $arguments -Wait -Credential $credentials 41 | Write-Output "IE Setup finished Done!" -------------------------------------------------------------------------------- /scripts/provisioners/ie_setup_runner_ps.cmd: -------------------------------------------------------------------------------- 1 | REM -------------------------------------------------------------- 2 | REM 3 | REM dev.microsoftedge.com -VMs 4 | REM Copyright(c) Microsoft Corporation. All rights reserved. 5 | REM 6 | REM MIT License 7 | REM 8 | REM Permission is hereby granted, free of charge, to any person obtaining 9 | REM a copy of this software and associated documentation files(the ""Software""), 10 | REM to deal in the Software without restriction, including without limitation the rights 11 | REM to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies 12 | REM of the Software, and to permit persons to whom the Software is furnished to do so, 13 | REM subject to the following conditions : 14 | REM 15 | REM The above copyright notice and this permission notice shall be included 16 | REM in all copies or substantial portions of the Software. 17 | REM 18 | REM THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 19 | REM INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 20 | REM FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS 21 | REM OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | REM WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 23 | REM OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | REM 25 | REM -------------------------------------------------------------- 26 | 27 | C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy ByPass -File c:\windows\temp\ie_setup_runner.ps1 -uri %1 -AutoStart -Wait -------------------------------------------------------------------------------- /scripts/provisioners/restore-uac.bat: -------------------------------------------------------------------------------- 1 | cmd /c %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 1 /f -------------------------------------------------------------------------------- /scripts/provisioners/vm-guest-tools.bat: -------------------------------------------------------------------------------- 1 | REM -------------------------------------------------------------- 2 | REM 3 | REM dev.microsoftedge.com -VMs 4 | REM Copyright(c) Microsoft Corporation. All rights reserved. 5 | REM 6 | REM MIT License 7 | REM 8 | REM Permission is hereby granted, free of charge, to any person obtaining 9 | REM a copy of this software and associated documentation files(the ""Software""), 10 | REM to deal in the Software without restriction, including without limitation the rights 11 | REM to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies 12 | REM of the Software, and to permit persons to whom the Software is furnished to do so, 13 | REM subject to the following conditions : 14 | REM 15 | REM The above copyright notice and this permission notice shall be included 16 | REM in all copies or substantial portions of the Software. 17 | REM 18 | REM THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 19 | REM INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 20 | REM FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS 21 | REM OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | REM WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 23 | REM OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | REM 25 | REM -------------------------------------------------------------- 26 | 27 | @echo off 28 | if not exist "C:\Windows\Temp\7z920.msi" ( 29 | powershell -Command "(New-Object System.Net.WebClient).DownloadFile('http://www.7-zip.org/a/7z920.msi', 'C:\Windows\Temp\7z920.msi')" <NUL 30 | ) 31 | msiexec /qb /i C:\Windows\Temp\7z920.msi 32 | 33 | if "%PACKER_BUILDER_TYPE%" equ "vmware-iso" goto :vmware 34 | if "%PACKER_BUILDER_TYPE%" equ "virtualbox-iso" goto :virtualbox 35 | if "%PACKER_BUILDER_TYPE%" equ "parallels-iso" goto :parallels 36 | goto :done 37 | 38 | :vmware 39 | echo vmware 40 | if exist "C:\Users\IEUser\windows.iso" ( 41 | move /Y C:\Users\IEUser\windows.iso C:\Windows\Temp 42 | ) 43 | 44 | echo vmware step1 45 | if not exist "C:\Windows\Temp\windows.iso" ( 46 | powershell -Command "(New-Object System.Net.WebClient).DownloadFile('http://softwareupdate.vmware.com/cds/vmw-desktop/ws/11.1.2/2780323/windows/packages/tools-windows-9.9.3.exe.tar', 'C:\Windows\Temp\vmware-tools.exe.tar')" <NUL 47 | cmd /c ""C:\Program Files ^(x86^)\7-Zip\7z.exe" x C:\Windows\Temp\vmware-tools.exe.tar -oC:\Windows\Temp" 48 | FOR /r "C:\Windows\Temp" %%a in (tools-windows-*.exe) DO REN "%%~a" "tools-windows.exe" 49 | cmd /c C:\Windows\Temp\tools-windows 50 | move /Y "C:\Program Files ^(x86^)\VMware\tools-windows\windows.iso" C:\Windows\Temp 51 | rd /S /Q "C:\Program Files ^(x86^)\VMWare" 52 | ) 53 | 54 | echo vmware step2 55 | cmd /c ""C:\Program Files ^(x86^)\7-Zip\7z.exe" x "C:\Windows\Temp\windows.iso" -oC:\Windows\Temp\VMWare" 56 | echo vmware step3 57 | cmd /c C:\Windows\Temp\VMWare\setup.exe /S /v"/qn REBOOT=R\" 58 | 59 | goto :done 60 | 61 | :virtualbox 62 | 63 | :: There needs to be Oracle CA (Certificate Authority) certificates installed in order 64 | :: to prevent user intervention popups which will undermine a silent installation. 65 | cmd /c "e: && cd cert && for %%i in (vbox*.cer) do VBoxCertUtil add-trusted-publisher %%i --root %%i" 66 | 67 | :: certutil -addstore -f "TrustedPublisher" A:\oracle-cert.cer 68 | 69 | ::move /Y C:\Users\IEUser\VBoxGuestAdditions.iso C:\Windows\Temp 70 | ::cmd /c ""C:\Program Files\7-Zip\7z.exe" x C:\Windows\Temp\VBoxGuestAdditions.iso -oC:\Windows\Temp\virtualbox" 71 | cmd /c E:\VBoxWindowsAdditions.exe /S 72 | goto :done 73 | 74 | :parallels 75 | if exist "C:\Users\IEUser\prl-tools-win.iso" ( 76 | move /Y C:\Users\IEUser\prl-tools-win.iso C:\Windows\Temp 77 | cmd /C ""C:\Program Files ^(x86^)\7-Zip\7z.exe"" x C:\Windows\Temp\prl-tools-win.iso -oC:\Windows\Temp\parallels 78 | cmd /C C:\Windows\Temp\parallels\PTAgent.exe /install_silent 79 | rd /S /Q "c:\Windows\Temp\parallels" 80 | ) 81 | 82 | :done 83 | msiexec /qb /x C:\Windows\Temp\7z920.msi 84 | 85 | SET ERRORLEVEL=0 -------------------------------------------------------------------------------- /scripts/provisioners/vm-guest-toolsx86.bat: -------------------------------------------------------------------------------- 1 | REM -------------------------------------------------------------- 2 | REM 3 | REM dev.microsoftedge.com -VMs 4 | REM Copyright(c) Microsoft Corporation. All rights reserved. 5 | REM 6 | REM MIT License 7 | REM 8 | REM Permission is hereby granted, free of charge, to any person obtaining 9 | REM a copy of this software and associated documentation files(the ""Software""), 10 | REM to deal in the Software without restriction, including without limitation the rights 11 | REM to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies 12 | REM of the Software, and to permit persons to whom the Software is furnished to do so, 13 | REM subject to the following conditions : 14 | REM 15 | REM The above copyright notice and this permission notice shall be included 16 | REM in all copies or substantial portions of the Software. 17 | REM 18 | REM THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 19 | REM INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 20 | REM FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS 21 | REM OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | REM WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 23 | REM OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | REM 25 | REM -------------------------------------------------------------- 26 | 27 | @echo off 28 | if not exist "C:\Windows\Temp\7z920.msi" ( 29 | powershell -Command "(New-Object System.Net.WebClient).DownloadFile('http://www.7-zip.org/a/7z920.msi', 'C:\Windows\Temp\7z920.msi')" <NUL 30 | ) 31 | msiexec /qb /i C:\Windows\Temp\7z920.msi 32 | 33 | if "%PACKER_BUILDER_TYPE%" equ "vmware-iso" goto :vmware 34 | if "%PACKER_BUILDER_TYPE%" equ "virtualbox-iso" goto :virtualbox 35 | if "%PACKER_BUILDER_TYPE%" equ "parallels-iso" goto :parallels 36 | goto :done 37 | 38 | :vmware 39 | echo vmware 40 | if exist "C:\Users\IEUser\windows.iso" ( 41 | move /Y C:\Users\IEUser\windows.iso C:\Windows\Temp 42 | ) 43 | 44 | echo vmware step1 45 | if not exist "C:\Windows\Temp\windows.iso" ( 46 | powershell -Command "(New-Object System.Net.WebClient).DownloadFile('http://softwareupdate.vmware.com/cds/vmw-desktop/ws/11.1.2/2780323/windows/packages/tools-windows-9.9.3.exe.tar', 'C:\Windows\Temp\vmware-tools.exe.tar')" <NUL 47 | cmd /c ""C:\Program Files ^(x86^)\7-Zip\7z.exe" x C:\Windows\Temp\vmware-tools.exe.tar -oC:\Windows\Temp" 48 | FOR /r "C:\Windows\Temp" %%a in (tools-windows-*.exe) DO REN "%%~a" "tools-windows.exe" 49 | cmd /c C:\Windows\Temp\tools-windows 50 | move /Y "C:\Program Files ^(x86^)\VMware\tools-windows\windows.iso" C:\Windows\Temp 51 | rd /S /Q "C:\Program Files ^(x86^)\VMWare" 52 | ) 53 | 54 | echo vmware step2 55 | cmd /c ""C:\Program Files ^(x86^)\7-Zip\7z.exe" x "C:\Windows\Temp\windows.iso" -oC:\Windows\Temp\VMWare" 56 | echo vmware step3 57 | cmd /c C:\Windows\Temp\VMWare\setup.exe /S /v"/qn REBOOT=R\" 58 | 59 | goto :done 60 | 61 | :virtualbox 62 | 63 | :: There needs to be Oracle CA (Certificate Authority) certificates installed in order 64 | :: to prevent user intervention popups which will undermine a silent installation. 65 | cmd /c "e: && cd cert && for %%i in (vbox*.cer) do VBoxCertUtil add-trusted-publisher %%i --root %%i" 66 | :: cmd /c certutil -addstore -f "TrustedPublisher" A:\oracle-cert.cer 67 | 68 | ::move /Y C:\Users\IEUser\VBoxGuestAdditions.iso C:\Windows\Temp 69 | ::cmd /c ""C:\Program Files\7-Zip\7z.exe" x C:\Windows\Temp\VBoxGuestAdditions.iso -oC:\Windows\Temp\virtualbox" 70 | cmd /c E:\VBoxWindowsAdditions.exe /S 71 | goto :done 72 | 73 | :parallels 74 | if exist "C:\Users\IEUser\prl-tools-win.iso" ( 75 | move /Y C:\Users\IEUser\prl-tools-win.iso C:\Windows\Temp 76 | cmd /C ""C:\Program Files ^(x86^)\7-Zip\7z.exe"" x C:\Windows\Temp\prl-tools-win.iso -oC:\Windows\Temp\parallels 77 | cmd /C C:\Windows\Temp\parallels\PTAgent.exe /install_silent 78 | rd /S /Q "c:\Windows\Temp\parallels" 79 | ) 80 | 81 | :done 82 | msiexec /qb /x C:\Windows\Temp\7z920.msi 83 | 84 | SET ERRORLEVEL=0 -------------------------------------------------------------------------------- /scripts/template-parts/email-template.html: -------------------------------------------------------------------------------- 1 | <div>vmgen generation process completed at ${finishTime}</div> 2 | 3 | <h2>Summary</h2> 4 | <table style="border-spacing: 5px;"> 5 | <tr><th>OS Host</th><th>OS Guest</th><th>VM</th><th>Browser</th><th>Result</th></tr> 6 | ${list} 7 | </table> -------------------------------------------------------------------------------- /scripts/template-parts/floppy_files_common.json: -------------------------------------------------------------------------------- 1 | { 2 | "builders": [ 3 | { 4 | "type": "hyperv-iso", 5 | "floppy_files": [ 6 | "floppy/common/setautologon.ps1", 7 | "floppy/build.cfg", 8 | "floppy/openssh/openssh.ps1", 9 | "floppy/updates/win-updates.ps1", 10 | "floppy/common/post-win-updates.ps1", 11 | "floppy/common/finish-actions.ps1", 12 | "floppy/updates/microsoft-updates.bat", 13 | "floppy/common/preprovisioner.ps1", 14 | "floppy/bginfo/Bginfo.exe", 15 | "floppy/bginfo/install.vbs", 16 | "floppy/bginfo/background.jpg", 17 | "floppy/homepage/browser-homepage.ps1", 18 | "floppy/winrm/start-winrm.ps1", 19 | "floppy/winrm/config-winrm.cmd" 20 | ] 21 | }, 22 | { 23 | "type": "virtualbox-iso", 24 | "floppy_files": [ 25 | "floppy/common/setautologon.ps1", 26 | "floppy/build.cfg", 27 | "floppy/openssh/openssh.ps1", 28 | "floppy/updates/win-updates.ps1", 29 | "floppy/common/post-win-updates.ps1", 30 | "floppy/common/finish-actions.ps1", 31 | "floppy/updates/microsoft-updates.bat", 32 | "floppy/common/preprovisioner.ps1", 33 | "floppy/bginfo/Bginfo.exe", 34 | "floppy/bginfo/install.vbs", 35 | "floppy/bginfo/background.jpg", 36 | "floppy/homepage/browser-homepage.ps1", 37 | "floppy/winrm/start-winrm.ps1", 38 | "floppy/winrm/config-winrm.cmd" 39 | ] 40 | }, 41 | { 42 | "type": "vmware-iso", 43 | "floppy_files": [ 44 | "floppy/common/setautologon.ps1", 45 | "floppy/build.cfg", 46 | "floppy/openssh/openssh.ps1", 47 | "floppy/updates/win-updates.ps1", 48 | "floppy/common/post-win-updates.ps1", 49 | "floppy/common/finish-actions.ps1", 50 | "floppy/updates/microsoft-updates.bat", 51 | "floppy/common/preprovisioner.ps1", 52 | "floppy/bginfo/Bginfo.exe", 53 | "floppy/bginfo/install.vbs", 54 | "floppy/bginfo/background.jpg", 55 | "floppy/homepage/browser-homepage.ps1", 56 | "floppy/winrm/start-winrm.ps1", 57 | "floppy/winrm/config-winrm.cmd" 58 | ] 59 | }, 60 | { 61 | "type": "parallels-iso", 62 | "floppy_files": [ 63 | "floppy/common/setautologon.ps1", 64 | "floppy/build.cfg", 65 | "floppy/openssh/openssh.ps1", 66 | "floppy/updates/win-updates.ps1", 67 | "floppy/common/post-win-updates.ps1", 68 | "floppy/common/finish-actions.ps1", 69 | "floppy/updates/microsoft-updates.bat", 70 | "floppy/common/preprovisioner.ps1", 71 | "floppy/bginfo/Bginfo.exe", 72 | "floppy/bginfo/install.vbs", 73 | "floppy/bginfo/background.jpg", 74 | "floppy/homepage/browser-homepage.ps1", 75 | "floppy/winrm/start-winrm.ps1", 76 | "floppy/winrm/config-winrm.cmd" 77 | ] 78 | } 79 | ] 80 | } -------------------------------------------------------------------------------- /scripts/template-parts/floppy_files_win10.json: -------------------------------------------------------------------------------- 1 | { 2 | "builders": [ 3 | { 4 | "type": "hyperv-iso", 5 | "floppy_files": [ 6 | "floppy/common/setautologon.ps1", 7 | "answer_files/10/autounattend.xml", 8 | "floppy/common/preprovisioner.cmd", 9 | "floppy/bginfo/win10/bgconfig.bgi", 10 | "floppy/eula/win10/eula.txt" 11 | ] 12 | }, 13 | { 14 | "type": "virtualbox-iso", 15 | "floppy_files": [ 16 | "floppy/common/setautologon.ps1", 17 | "answer_files/10/autounattend.xml", 18 | "floppy/common/preprovisioner.cmd", 19 | "floppy/bginfo/win10/bgconfig.bgi", 20 | "floppy/eula/win10/eula.txt" 21 | ] 22 | }, 23 | { 24 | "type": "vmware-iso", 25 | "floppy_files": [ 26 | "floppy/common/setautologon.ps1", 27 | "answer_files/10/autounattend.xml", 28 | "floppy/common/preprovisioner.cmd", 29 | "floppy/bginfo/win10/bgconfig.bgi", 30 | "floppy/eula/win10/eula.txt" 31 | ] 32 | }, 33 | { 34 | "type": "parallels-iso", 35 | "floppy_files": [ 36 | "floppy/common/setautologon.ps1", 37 | "answer_files/10/autounattend.xml", 38 | "floppy/common/preprovisioner.cmd", 39 | "floppy/bginfo/win10/bgconfig.bgi", 40 | "floppy/eula/win10/eula.txt" 41 | ] 42 | } 43 | ] 44 | } 45 | -------------------------------------------------------------------------------- /scripts/template-parts/floppy_files_win10_previewx64.json: -------------------------------------------------------------------------------- 1 | { 2 | "builders": [ 3 | { 4 | "type": "hyperv-iso", 5 | "floppy_files": [ 6 | "answer_files/10_preview/autounattend.xml", 7 | "floppy/common/preprovisioner.cmd", 8 | "floppy/bginfo/win10/bgconfig.bgi", 9 | "floppy/eula/win10/eula.txt" 10 | ] 11 | }, 12 | { 13 | "type": "virtualbox-iso", 14 | "floppy_files": [ 15 | "answer_files/10_preview/autounattend.xml", 16 | "floppy/common/preprovisioner.cmd", 17 | "floppy/bginfo/win10/bgconfig.bgi", 18 | "floppy/eula/win10/eula.txt" 19 | ] 20 | }, 21 | { 22 | "type": "vmware-iso", 23 | "floppy_files": [ 24 | "answer_files/10_preview/autounattend.xml", 25 | "floppy/common/preprovisioner.cmd", 26 | "floppy/bginfo/win10/bgconfig.bgi", 27 | "floppy/eula/win10/eula.txt" 28 | ] 29 | }, 30 | { 31 | "type": "parallels-iso", 32 | "floppy_files": [ 33 | "answer_files/10_preview/autounattend.xml", 34 | "floppy/common/preprovisioner.cmd", 35 | "floppy/bginfo/win10/bgconfig.bgi", 36 | "floppy/eula/win10/eula.txt" 37 | ] 38 | } 39 | ] 40 | } 41 | -------------------------------------------------------------------------------- /scripts/template-parts/floppy_files_win7.json: -------------------------------------------------------------------------------- 1 | { 2 | "builders": [ 3 | { 4 | "type": "hyperv-iso", 5 | "floppy_files": [ 6 | "answer_files/7/autounattend.xml", 7 | "floppy/common/preprovisioner.cmd", 8 | "floppy/bginfo/bgconfig.bgi", 9 | "floppy/eula/win7/eula.txt" 10 | ] 11 | }, 12 | { 13 | "type": "virtualbox-iso", 14 | "floppy_files": [ 15 | "answer_files/7/autounattend.xml", 16 | "floppy/common/preprovisioner.cmd", 17 | "floppy/bginfo/bgconfig.bgi", 18 | "floppy/eula/win7/eula.txt" 19 | ] 20 | }, 21 | { 22 | "type": "vmware-iso", 23 | "floppy_files": [ 24 | "answer_files/7/autounattend.xml", 25 | "floppy/common/preprovisioner.cmd", 26 | "floppy/bginfo/bgconfig.bgi", 27 | "floppy/eula/win7/eula.txt" 28 | ] 29 | }, 30 | { 31 | "type": "parallels-iso", 32 | "floppy_files": [ 33 | "answer_files/7/autounattend.xml", 34 | "floppy/common/preprovisioner.cmd", 35 | "floppy/bginfo/bgconfig.bgi", 36 | "floppy/eula/win7/eula.txt" 37 | ] 38 | } 39 | ] 40 | } 41 | -------------------------------------------------------------------------------- /scripts/template-parts/floppy_files_win81.json: -------------------------------------------------------------------------------- 1 | { 2 | "builders": [ 3 | { 4 | "type": "hyperv-iso", 5 | "floppy_files": [ 6 | "answer_files/81/autounattend.xml", 7 | "floppy/common/preprovisioner.cmd", 8 | "floppy/bginfo/bgconfig.bgi", 9 | "floppy/eula/win81/eula.txt" 10 | ] 11 | }, 12 | { 13 | "type": "virtualbox-iso", 14 | "floppy_files": [ 15 | "answer_files/81/autounattend.xml", 16 | "floppy/common/preprovisioner.cmd", 17 | "floppy/bginfo/bgconfig.bgi", 18 | "floppy/eula/win81/eula.txt" 19 | ] 20 | }, 21 | { 22 | "type": "vmware-iso", 23 | "floppy_files": [ 24 | "answer_files/81/autounattend.xml", 25 | "floppy/common/preprovisioner.cmd", 26 | "floppy/bginfo/bgconfig.bgi", 27 | "floppy/eula/win81/eula.txt" 28 | ] 29 | }, 30 | { 31 | "type": "parallels-iso", 32 | "floppy_files": [ 33 | "answer_files/81/autounattend.xml", 34 | "floppy/common/preprovisioner.cmd", 35 | "floppy/bginfo/bgconfig.bgi", 36 | "floppy/eula/win81/eula.txt" 37 | ] 38 | } 39 | ] 40 | } 41 | -------------------------------------------------------------------------------- /scripts/template-parts/parallels-command.template: -------------------------------------------------------------------------------- 1 | export PATH="$PATH:/usr/local/bin" 2 | cd {{path_repo}}/scripts 3 | {{path_packer}}/packer build -only=parallels-iso -color=false -force ./template-output/{{template}} -------------------------------------------------------------------------------- /scripts/template-parts/pp-vagrant.json: -------------------------------------------------------------------------------- 1 | { 2 | "postprocessors": [ 3 | { 4 | "type": "vagrant", 5 | "compression_level": 6, 6 | "keep_input_artifact": true, 7 | "output": "..\\vms\\output\\Vagrant\\edgems.box", 8 | "only": ["virtualbox-iso"] 9 | } 10 | ] 11 | } -------------------------------------------------------------------------------- /scripts/template-parts/provisioner_common.json: -------------------------------------------------------------------------------- 1 | { 2 | "provisioners": [ 3 | { 4 | "type": "shell", 5 | "remote_path": "/tmp/script.bat", 6 | "execute_command": "{{.Vars}} cmd /c C:/Windows/Temp/script.bat", 7 | "scripts": [ 8 | "./provisioners/vm-guest-tools.bat", 9 | "./provisioners/compact.bat", 10 | "./provisioners/restore-uac.bat", 11 | "./provisioners/disable-autologon.bat" 12 | ] 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /scripts/template-parts/provisioner_commonx86.json: -------------------------------------------------------------------------------- 1 | { 2 | "provisioners": [ 3 | { 4 | "type": "shell", 5 | "remote_path": "/tmp/script.bat", 6 | "execute_command": "{{.Vars}} cmd /c C:/Windows/Temp/script.bat", 7 | "scripts": [ 8 | "./provisioners/vm-guest-toolsx86.bat", 9 | "./provisioners/compactx86.bat" 10 | ] 11 | } 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /scripts/template-parts/template/OSx64.json: -------------------------------------------------------------------------------- 1 | { 2 | "variables": { 3 | "version": "0.1.0", 4 | "shutdown_command": "cscript c:/windows/system32/slmgr.vbs /rearm & shutdown /s /f /d p:4:1", 5 | "update": "true" 6 | }, 7 | "builders": [ 8 | { 9 | "type": "hyperv-iso", 10 | "vm_name": "MSEdge - Win10", 11 | "iso_url": "{{ user `iso_url` }}", 12 | "iso_checksum": "{{ user `iso_checksum` }}", 13 | "iso_checksum_type": "sha1", 14 | "ssh_username": "{{ user `ssh_user` }}", 15 | "ssh_password": "{{ user `ssh_pwd` }}", 16 | "ssh_wait_timeout": "10000s", 17 | "ram_size_mb": 2048, 18 | "disk_size": 40960, 19 | "switch_name": "", 20 | "shutdown_command": "{{ user `shutdown_command`}}", 21 | "output_directory" : "..\\vms\\output\\MSEdge-Win10-HyperV" 22 | }, 23 | { 24 | "type": "virtualbox-iso", 25 | "vm_name": "MSEdge - Win10", 26 | "communicator": "ssh", 27 | "iso_url": "{{ user `iso_url` }}", 28 | "iso_checksum": "{{ user `iso_checksum` }}", 29 | "iso_checksum_type": "sha1", 30 | "ssh_wait_timeout": "16h", 31 | "ssh_username": "{{ user `ssh_user` }}", 32 | "ssh_password": "{{ user `ssh_pwd` }}", 33 | "guest_os_type": "Windows10_64", 34 | "format" : "ova", 35 | "guest_additions_mode" : "attach", 36 | "output_directory" : "..\\vms\\output\\MSEdge-Win10-VirtualBox", 37 | "headless": "{{ user `headless` }}", 38 | "disk_size": 40960, 39 | "vboxmanage": [ 40 | [ 41 | "modifyvm", 42 | "{{.Name}}", 43 | "--memory", 44 | "2048" 45 | ] 46 | ], 47 | "shutdown_command": "{{ user `shutdown_command`}}" 48 | }, 49 | { 50 | "type": "vmware-iso", 51 | "vm_name": "MSEdge - Win10", 52 | "iso_url": "{{ user `iso_url` }}", 53 | "iso_checksum": "{{ user `iso_checksum` }}", 54 | "iso_checksum_type": "sha1", 55 | "headless": true, 56 | "ssh_username": "{{ user `ssh_user` }}", 57 | "ssh_password": "{{ user `ssh_pwd` }}", 58 | "ssh_wait_timeout": "16h", 59 | "shutdown_command": "{{ user `shutdown_command`}}", 60 | "guest_os_type": "windows9-64", 61 | "boot_wait": "2m", 62 | "tools_upload_flavor": "windows", 63 | "output_directory" : "..\\vms\\output\\MSEdge-Win10-VMware-vmx", 64 | "disk_size": 40960, 65 | "vnc_port_min": 5900, 66 | "vnc_port_max": 5980, 67 | "vmx_data": { 68 | "RemoteDisplay.vnc.enabled": "false", 69 | "RemoteDisplay.vnc.port": "5900", 70 | "memsize": "2048", 71 | "numvcpus": "2", 72 | "scsi0.virtualDev": "lsisas1068" 73 | } 74 | }, 75 | { 76 | "type": "parallels-iso", 77 | "vm_name": "MSEdge - Win10", 78 | "communicator": "ssh", 79 | "iso_url": "{{ user `iso_url` }}", 80 | "iso_checksum": "{{ user `iso_checksum` }}", 81 | "iso_checksum_type": "sha1", 82 | "parallels_tools_flavor": "win", 83 | "parallels_tools_mode": "upload", 84 | "ssh_username": "{{ user `ssh_user` }}", 85 | "ssh_password": "{{ user `ssh_pwd` }}", 86 | "ssh_wait_timeout": "16h", 87 | "shutdown_command": "{{ user `shutdown_command`}}", 88 | "output_directory" : "MSEdge-Win10-Parallels", 89 | "guest_os_type": "win-10", 90 | "prlctl": [ 91 | ["set", "{{.Name}}", "--memsize", "2048"], 92 | ["set", "{{.Name}}", "--cpus", "2"] 93 | ] 94 | } 95 | ] 96 | } 97 | -------------------------------------------------------------------------------- /scripts/template-parts/template/floppy_files_OS.json: -------------------------------------------------------------------------------- 1 | { 2 | "builders": [ 3 | { 4 | "type": "hyperv-iso", 5 | "floppy_files": [ 6 | "answer_files/10/autounattend.xml", 7 | "floppy/common/preprovisioner.cmd", 8 | "floppy/bginfo/win10/bgconfig.bgi", 9 | "floppy/eula/win10/eula.txt" 10 | ] 11 | }, 12 | { 13 | "type": "virtualbox-iso", 14 | "floppy_files": [ 15 | "answer_files/10/autounattend.xml", 16 | "floppy/common/preprovisioner.cmd", 17 | "floppy/bginfo/win10/bgconfig.bgi", 18 | "floppy/eula/win10/eula.txt" 19 | ] 20 | }, 21 | { 22 | "type": "vmware-iso", 23 | "floppy_files": [ 24 | "answer_files/10/autounattend.xml", 25 | "floppy/common/preprovisioner.cmd", 26 | "floppy/bginfo/win10/bgconfig.bgi", 27 | "floppy/eula/win10/eula.txt" 28 | ] 29 | }, 30 | { 31 | "type": "parallels-iso", 32 | "floppy_files": [ 33 | "answer_files/10/autounattend.xml", 34 | "floppy/common/preprovisioner.cmd", 35 | "floppy/bginfo/win10/bgconfig.bgi", 36 | "floppy/eula/win10/eula.txt" 37 | ] 38 | } 39 | ] 40 | } 41 | -------------------------------------------------------------------------------- /scripts/template-parts/template/urls_OSx64.json: -------------------------------------------------------------------------------- 1 | { 2 | "variables": { 3 | "iso_url": "iso/10240.16384.150709-1700.TH1_CLIENTENTERPRISEEVAL_OEMRET_X64FRE_EN-US.iso", 4 | "iso_checksum": "56AB095075BE28A90BC0B510835280975C6BB2CE" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /scripts/template-parts/urls_win10_previewx64.json: -------------------------------------------------------------------------------- 1 | { 2 | "variables": { 3 | "iso_url": "iso/16232.1000.170624-1334.RS_PRERELEASE_CLIENTENTERPRISEEVAL_OEMRET_X64FRE_EN-US.iso", 4 | "iso_checksum": "19a1b0f0aaadb6a77ce044f9ad16bd25", 5 | "iso_checksum_type": "md5" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /scripts/template-parts/urls_win10x64.json: -------------------------------------------------------------------------------- 1 | { 2 | "variables": { 3 | "iso_url": "iso/15063.0.170317-1834.RS2_RELEASE_CLIENTENTERPRISEEVAL_OEMRET_X64FRE_EN-US.iso", 4 | "iso_checksum": "cf812813211add8fe7c53b07b7caff8c", 5 | "iso_checksum_type": "md5" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /scripts/template-parts/urls_win7x86.json: -------------------------------------------------------------------------------- 1 | { 2 | "variables": { 3 | "iso_url": "iso/7600.16385.090713-1255_x86_enterprise_en-us_EVAL.iso", 4 | "iso_checksum": "971FC00183A52C152FE924A6B99FDEC011A871C2", 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /scripts/template-parts/urls_win81x64.json: -------------------------------------------------------------------------------- 1 | { 2 | "variables": { 3 | "iso_url": "iso/9600.17050.WINBLUE_REFRESH.140317-1640_X64FRE_ENTERPRISE_EVAL_EN-US-IR3_CENA_X64FREE_EN-US_DV9.iso", 4 | "iso_checksum": "7C7D99546077C805FAAE40A8864882C46F0CA141" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /scripts/template-parts/user.json: -------------------------------------------------------------------------------- 1 | { 2 | "variables": { 3 | "ssh_user" : "IEUser", 4 | "ssh_pwd" : "Passw0rd!" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /scripts/template-parts/variables_win7_ie10.json: -------------------------------------------------------------------------------- 1 | { 2 | "variables": { 3 | "vmname": "IE10 - Win7", 4 | "outputpath": "IE10-Win7" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /scripts/template-parts/variables_win7_ie11.json: -------------------------------------------------------------------------------- 1 | { 2 | "variables": { 3 | "vmname": "IE11 - Win7", 4 | "outputpath": "IE11-Win7" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /scripts/template-parts/variables_win7_ie8.json: -------------------------------------------------------------------------------- 1 | { 2 | "variables": { 3 | "vmname": "IE8 - Win7", 4 | "outputpath": "IE8-Win7" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /scripts/template-parts/variables_win7_ie9.json: -------------------------------------------------------------------------------- 1 | { 2 | "variables": { 3 | "vmname": "IE9 - Win7", 4 | "outputpath": "IE9-Win7" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /scripts/template-parts/vpc.vmc.template: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-16"?> 2 | <!-- Microsoft Virtual Machine Options and Settings --> 3 | <preferences> 4 | <version type="string">2.0</version> 5 | <event_logging> 6 | <preference_change> 7 | <enabled type="boolean">false</enabled> 8 | </preference_change> 9 | </event_logging> 10 | <hardware> 11 | <bios> 12 | <base_board> 13 | <serial_number type="string">2239-4341-1642-9350-9545-7276-81</serial_number> 14 | </base_board> 15 | <bios_guid type="string">{50069CC6-2266-443E-9BD6-A777426C3755}</bios_guid> 16 | <bios_serial_number type="string">2239-4341-1642-9350-9545-7276-81</bios_serial_number> 17 | <chassis> 18 | <asset_tag type="string">9791-1806-1911-9702-3921-0693-28</asset_tag> 19 | <serial_number type="string">2239-4341-1642-9350-9545-7276-81</serial_number> 20 | </chassis> 21 | <cmos type="bytes">00004000F020378002FFFF2F00FF3F1000003F00000000000031004C07070707065CFFFF208580FF03000000200C01800CFC00000000000000000000000000901A32E252580050E999E62401002784004A2080240000000000085AACFE1032547698BAE400000000000003000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000</cmos> 22 | <time_bytes type="bytes">19005500080006291114</time_bytes> 23 | </bios> 24 | <memory> 25 | <ram_size type="integer">1024</ram_size> 26 | </memory> 27 | <pci_bus> 28 | <ethernet_adapter> 29 | <controller_count type="integer">1</controller_count> 30 | <ethernet_controller id="0"> 31 | <ethernet_card_address type="bytes">0003FF2FE6C0</ethernet_card_address> 32 | <id type="integer">0</id> 33 | <virtual_network> 34 | <id type="bytes">FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF</id> 35 | <name type="string">Unplugged</name> 36 | </virtual_network> 37 | </ethernet_controller> 38 | </ethernet_adapter> 39 | <video_adapter> 40 | <vram_size type="integer">16</vram_size> 41 | </video_adapter> 42 | <ide_adapter> 43 | <ide_controller id="0"> 44 | <location id="0"> 45 | <drive_type type="integer">1</drive_type> 46 | <pathname> 47 | <absolute type="string">C:\{{name}}.vhd</absolute> 48 | <relative type="string">.\{{name}}.vhd</relative> 49 | </pathname> 50 | <undo_pathname> 51 | <absolute type="string" /> 52 | <relative type="string" /> 53 | </undo_pathname> 54 | </location> 55 | </ide_controller> 56 | <ide_controller id="1"> 57 | <location id="0"> 58 | <drive_type type="integer">2</drive_type> 59 | <pathname> 60 | <absolute type="string">D</absolute> 61 | <relative type="string" /> 62 | </pathname> 63 | </location> 64 | </ide_controller> 65 | </ide_adapter> 66 | </pci_bus> 67 | <standard> 68 | <name type="string">Virtual PC 7</name> 69 | <version type="string">0001.0000.0000</version> 70 | </standard> 71 | <super_io> 72 | <floppy id="0"> 73 | <pathname> 74 | <absolute type="string" /> 75 | </pathname> 76 | </floppy> 77 | <parallel_port> 78 | <port_type type="integer">0</port_type> 79 | </parallel_port> 80 | <serial_port> 81 | <connect_immediately type="boolean">false</connect_immediately> 82 | </serial_port> 83 | </super_io> 84 | </hardware> 85 | <integration> 86 | <microsoft> 87 | <folder_sharing> 88 | <enabled type="boolean">false</enabled> 89 | <load_allowed type="boolean">false</load_allowed> 90 | </folder_sharing> 91 | <heartbeat> 92 | <failure_attempts type="integer">12</failure_attempts> 93 | <failure_interval type="integer">10</failure_interval> 94 | <rate type="integer">10</rate> 95 | <time type="integer">60</time> 96 | </heartbeat> 97 | <host_time_sync> 98 | <enabled type="boolean">true</enabled> 99 | <frequency type="integer">15</frequency> 100 | <threshold type="integer">10</threshold> 101 | </host_time_sync> 102 | <mouse> 103 | <allow type="boolean">true</allow> 104 | </mouse> 105 | <version> 106 | <guest_os> 107 | <build_number type="string">6.01.7601</build_number> 108 | <long_name type="string">{{name}}</long_name> 109 | <short_name type="string">{{name}}</short_name> 110 | <computer_name type="string">{{computer_name}}</computer_name> 111 | </guest_os> 112 | <additions_number type="string">14.1.7600.16403</additions_number> 113 | </version> 114 | </microsoft> 115 | </integration> 116 | <properties> 117 | <creator> 118 | <build type="string">6.1.7601.17514</build> 119 | <name type="string">Virtual PC</name> 120 | </creator> 121 | <modifier> 122 | <build type="string">6.1.7601.17514</build> 123 | <name type="string">Virtual PC</name> 124 | </modifier> 125 | </properties> 126 | <settings> 127 | <configuration> 128 | <next_id type="integer">1</next_id> 129 | <saved_state> 130 | <path> 131 | <absolute type="string" /> 132 | <relative type="string" /> 133 | </path> 134 | </saved_state> 135 | </configuration> 136 | <disks> 137 | <track_disk_cache> 138 | <enabled type="boolean">true</enabled> 139 | </track_disk_cache> 140 | </disks> 141 | <globalconfigid type="string">{BCF59489-0E15-497E-AD41-83359EEB1146}</globalconfigid> 142 | <host> 143 | <resource_control> 144 | <cpu> 145 | <host_processors type="integer">1</host_processors> 146 | </cpu> 147 | </resource_control> 148 | </host> 149 | <notes type="string" /> 150 | <shutdown> 151 | <quit> 152 | <action type="integer">0</action> 153 | </quit> 154 | </shutdown> 155 | <sound> 156 | <sound_adapter> 157 | <enable type="boolean">true</enable> 158 | </sound_adapter> 159 | </sound> 160 | <undo_drives> 161 | <always type="boolean">false</always> 162 | <default_action type="integer">1</default_action> 163 | <enabled type="boolean">false</enabled> 164 | <purposely_kept type="boolean">false</purposely_kept> 165 | <use_default type="boolean">true</use_default> 166 | </undo_drives> 167 | <video> 168 | <enhanced_mode type="boolean">true</enhanced_mode> 169 | <full_screen type="boolean">false</full_screen> 170 | </video> 171 | <guest_os type="integer">8</guest_os> 172 | </settings> 173 | <virtual_machines> 174 | <allow_packet_filtering type="boolean">false</allow_packet_filtering> 175 | <allow_promiscuous_mode type="boolean">false</allow_promiscuous_mode> 176 | </virtual_machines> 177 | <multi_channel type="boolean">true</multi_channel> 178 | <ui_options> 179 | <guest_rail_enabled type="boolean">true</guest_rail_enabled> 180 | <window_xpos type="integer">181</window_xpos> 181 | <window_ypos type="integer">46</window_ypos> 182 | <full_screen type="boolean">false</full_screen> 183 | <resolution_height type="integer">864</resolution_height> 184 | <resolution_width type="integer">1152</resolution_width> 185 | </ui_options> 186 | </preferences> 187 | -------------------------------------------------------------------------------- /scripts/template-parts/win10_previewx64.json: -------------------------------------------------------------------------------- 1 | { 2 | "variables": { 3 | "version": "0.1.0", 4 | "shutdown_command": "cscript c:/windows/system32/slmgr.vbs /rearm & shutdown /s /f /d p:4:1", 5 | "update": "true" 6 | }, 7 | "builders": [ 8 | { 9 | "type": "hyperv-iso", 10 | "vm_name": "MSEdge - Win10_preview", 11 | "iso_url": "{{ user `iso_url` }}", 12 | "iso_checksum": "{{ user `iso_checksum` }}", 13 | "iso_checksum_type": "{{ user `iso_checksum_type` }}", 14 | "ssh_username": "{{ user `ssh_user` }}", 15 | "ssh_password": "{{ user `ssh_pwd` }}", 16 | "ssh_timeout": "16h", 17 | "ram_size": 2048, 18 | "disk_size": 40960, 19 | "switch_name": "", 20 | "shutdown_command": "{{ user `shutdown_command`}}", 21 | "output_directory" : "..\\vms\\output\\MSEdge-Win10_preview-HyperV" 22 | }, 23 | { 24 | "type": "virtualbox-iso", 25 | "vm_name": "MSEdge - Win10_preview", 26 | "communicator": "ssh", 27 | "iso_url": "{{ user `iso_url` }}", 28 | "iso_checksum": "{{ user `iso_checksum` }}", 29 | "iso_checksum_type": "{{ user `iso_checksum_type` }}", 30 | "ssh_wait_timeout": "16h", 31 | "ssh_username": "{{ user `ssh_user` }}", 32 | "ssh_password": "{{ user `ssh_pwd` }}", 33 | "guest_os_type": "Windows10_64", 34 | "format" : "ova", 35 | "guest_additions_mode" : "attach", 36 | "output_directory" : "..\\vms\\output\\MSEdge-Win10_preview-VirtualBox", 37 | "headless": "{{ user `headless` }}", 38 | "disk_size": 40960, 39 | "vboxmanage": [ 40 | [ 41 | "modifyvm", 42 | "{{.Name}}", 43 | "--memory", 44 | "4096" 45 | ] 46 | ], 47 | "shutdown_command": "{{ user `shutdown_command`}}" 48 | }, 49 | { 50 | "type": "vmware-iso", 51 | "vm_name": "MSEdge - Win10_preview", 52 | "iso_url": "{{ user `iso_url` }}", 53 | "iso_checksum": "{{ user `iso_checksum` }}", 54 | "iso_checksum_type": "{{ user `iso_checksum_type` }}", 55 | "headless": false, 56 | "ssh_username": "{{ user `ssh_user` }}", 57 | "ssh_password": "{{ user `ssh_pwd` }}", 58 | "ssh_wait_timeout": "16h", 59 | "shutdown_command": "{{ user `shutdown_command`}}", 60 | "guest_os_type": "windows9-64", 61 | "boot_wait": "2m", 62 | "tools_upload_flavor": "windows", 63 | "output_directory" : "..\\vms\\output\\MSEdge-Win10_preview-VMware", 64 | "disk_size": 40960, 65 | "vnc_port_min": 5900, 66 | "vnc_port_max": 5980, 67 | "vmx_data": { 68 | "RemoteDisplay.vnc.enabled": "false", 69 | "RemoteDisplay.vnc.port": "5900", 70 | "memsize": "4096", 71 | "numvcpus": "2", 72 | "scsi0.virtualDev": "lsisas1068", 73 | "virtualHW.version": "12" 74 | } 75 | }, 76 | { 77 | "type": "parallels-iso", 78 | "vm_name": "MSEdge - Win10_preview", 79 | "communicator": "ssh", 80 | "iso_url": "{{ user `iso_url` }}", 81 | "iso_checksum": "{{ user `iso_checksum` }}", 82 | "iso_checksum_type": "{{ user `iso_checksum_type` }}", 83 | "parallels_tools_flavor": "win", 84 | "parallels_tools_mode": "upload", 85 | "ssh_username": "{{ user `ssh_user` }}", 86 | "ssh_password": "{{ user `ssh_pwd` }}", 87 | "ssh_wait_timeout": "16h", 88 | "shutdown_command": "{{ user `shutdown_command`}}", 89 | "output_directory" : "MSEdge-Win10_preview-Parallels", 90 | "guest_os_type": "win-10", 91 | "prlctl": [ 92 | ["set", "{{.Name}}", "--memsize", "2048"], 93 | ["set", "{{.Name}}", "--cpus", "2"] 94 | ] 95 | } 96 | ] 97 | } 98 | -------------------------------------------------------------------------------- /scripts/template-parts/win10x64.json: -------------------------------------------------------------------------------- 1 | { 2 | "variables": { 3 | "version": "0.1.0", 4 | "shutdown_command": "cscript c:/windows/system32/slmgr.vbs /rearm & shutdown /s /f /d p:4:1", 5 | "update": "true" 6 | }, 7 | "builders": [ 8 | { 9 | "type": "hyperv-iso", 10 | "vm_name": "MSEdge - Win10", 11 | "iso_url": "{{ user `iso_url` }}", 12 | "iso_checksum": "{{ user `iso_checksum` }}", 13 | "iso_checksum_type": "{{ user `iso_checksum_type` }}", 14 | "ssh_username": "{{ user `ssh_user` }}", 15 | "ssh_password": "{{ user `ssh_pwd` }}", 16 | "ssh_timeout": "16h", 17 | "ram_size": 2048, 18 | "disk_size": 40960, 19 | "switch_name": "", 20 | "shutdown_command": "{{ user `shutdown_command`}}", 21 | "output_directory" : "..\\vms\\output\\MSEdge-Win10-HyperV" 22 | }, 23 | { 24 | "type": "virtualbox-iso", 25 | "vm_name": "MSEdge - Win10", 26 | "communicator": "ssh", 27 | "iso_url": "{{ user `iso_url` }}", 28 | "iso_checksum": "{{ user `iso_checksum` }}", 29 | "iso_checksum_type": "{{ user `iso_checksum_type` }}", 30 | "ssh_wait_timeout": "16h", 31 | "ssh_username": "{{ user `ssh_user` }}", 32 | "ssh_password": "{{ user `ssh_pwd` }}", 33 | "guest_os_type": "Windows10_64", 34 | "format" : "ova", 35 | "guest_additions_mode" : "attach", 36 | "output_directory" : "..\\vms\\output\\MSEdge-Win10-VirtualBox", 37 | "headless": "{{ user `headless` }}", 38 | "disk_size": 40960, 39 | "vboxmanage": [ 40 | [ 41 | "modifyvm", 42 | "{{.Name}}", 43 | "--memory", 44 | "4096" 45 | ] 46 | ], 47 | "shutdown_command": "{{ user `shutdown_command`}}" 48 | }, 49 | { 50 | "type": "vmware-iso", 51 | "vm_name": "MSEdge - Win10", 52 | "iso_url": "{{ user `iso_url` }}", 53 | "iso_checksum": "{{ user `iso_checksum` }}", 54 | "iso_checksum_type": "{{ user `iso_checksum_type` }}", 55 | "headless": true, 56 | "ssh_username": "{{ user `ssh_user` }}", 57 | "ssh_password": "{{ user `ssh_pwd` }}", 58 | "ssh_wait_timeout": "16h", 59 | "shutdown_command": "{{ user `shutdown_command`}}", 60 | "guest_os_type": "windows9-64", 61 | "boot_wait": "2m", 62 | "tools_upload_flavor": "windows", 63 | "output_directory" : "..\\vms\\output\\MSEdge-Win10-VMware-vmx", 64 | "disk_size": 40960, 65 | "vnc_port_min": 5900, 66 | "vnc_port_max": 5980, 67 | "vmx_data": { 68 | "RemoteDisplay.vnc.enabled": "false", 69 | "RemoteDisplay.vnc.port": "5900", 70 | "memsize": "4096", 71 | "numvcpus": "2", 72 | "scsi0.virtualDev": "lsisas1068", 73 | "virtualHW.version": "12" 74 | } 75 | }, 76 | { 77 | "type": "parallels-iso", 78 | "vm_name": "MSEdge - Win10", 79 | "communicator": "ssh", 80 | "iso_url": "{{ user `iso_url` }}", 81 | "iso_checksum": "{{ user `iso_checksum` }}", 82 | "iso_checksum_type": "{{ user `iso_checksum_type` }}", 83 | "parallels_tools_flavor": "win", 84 | "parallels_tools_mode": "upload", 85 | "ssh_username": "{{ user `ssh_user` }}", 86 | "ssh_password": "{{ user `ssh_pwd` }}", 87 | "ssh_wait_timeout": "16h", 88 | "shutdown_command": "{{ user `shutdown_command`}}", 89 | "output_directory" : "MSEdge-Win10-Parallels", 90 | "guest_os_type": "win-10", 91 | "prlctl": [ 92 | ["set", "{{.Name}}", "--memsize", "2048"], 93 | ["set", "{{.Name}}", "--cpus", "2"] 94 | ] 95 | } 96 | ] 97 | } 98 | -------------------------------------------------------------------------------- /scripts/template-parts/win7x86.json: -------------------------------------------------------------------------------- 1 | { 2 | "variables": { 3 | "version": "0.1.0", 4 | "shutdown_command": "cscript c:/windows/system32/slmgr.vbs /rearm & shutdown /s /f /d p:4:1", 5 | "update": "true" 6 | }, 7 | "builders": [ 8 | { 9 | "type": "hyperv-iso", 10 | "vm_name": "{{ user `vmname` }}", 11 | "iso_url": "{{ user `iso_url` }}", 12 | "iso_checksum": "{{ user `iso_checksum` }}", 13 | "iso_checksum_type": "sha1", 14 | "ssh_username": "{{ user `ssh_user` }}", 15 | "ssh_password": "{{ user `ssh_pwd` }}", 16 | "ssh_timeout": "16h", 17 | "disk_size": 40960, 18 | "switch_name": "", 19 | "shutdown_command": "{{ user `shutdown_command`}}", 20 | "output_directory" : "..\\vms\\output\\{{ user `outputpath`}}-HyperV" 21 | }, 22 | { 23 | "type": "virtualbox-iso", 24 | "vm_name": "{{ user `vmname` }}", 25 | "communicator": "ssh", 26 | "iso_url": "{{ user `iso_url` }}", 27 | "iso_checksum": "{{ user `iso_checksum` }}", 28 | "iso_checksum_type": "sha1", 29 | "ssh_wait_timeout": "16h", 30 | "ssh_username": "{{ user `ssh_user` }}", 31 | "ssh_password": "{{ user `ssh_pwd` }}", 32 | "guest_os_type": "Windows7", 33 | "format" : "ova", 34 | "guest_additions_mode" : "attach", 35 | "output_directory" : "..\\vms\\output\\{{ user `outputpath`}}-VirtualBox", 36 | "headless": "{{ user `headless` }}", 37 | "disk_size": 40960, 38 | "vboxmanage": [ 39 | [ 40 | "modifyvm", 41 | "{{.Name}}", 42 | "--memory", 43 | "4096" 44 | ] 45 | ], 46 | "shutdown_command": "{{ user `shutdown_command`}}" 47 | }, 48 | { 49 | "type": "vmware-iso", 50 | "vm_name": "{{ user `vmname` }}", 51 | "iso_url": "{{ user `iso_url` }}", 52 | "iso_checksum": "{{ user `iso_checksum` }}", 53 | "iso_checksum_type": "sha1", 54 | "headless": true, 55 | "ssh_username": "{{ user `ssh_user` }}", 56 | "ssh_password": "{{ user `ssh_pwd` }}", 57 | "ssh_wait_timeout": "16h", 58 | "shutdown_command": "{{ user `shutdown_command`}}", 59 | "guest_os_type": "windows7-32", 60 | "boot_wait": "2m", 61 | "tools_upload_flavor": "windows", 62 | "output_directory" : "..\\vms\\output\\{{ user `outputpath`}}-VMware-vmx", 63 | "disk_size": 40960, 64 | "vnc_port_min": 5900, 65 | "vnc_port_max": 5980, 66 | "vmx_data": { 67 | "RemoteDisplay.vnc.enabled": "false", 68 | "RemoteDisplay.vnc.port": "5900", 69 | "memsize": "4096", 70 | "numvcpus": "2", 71 | "scsi0.virtualDev": "lsisas1068" 72 | } 73 | }, 74 | { 75 | "type": "parallels-iso", 76 | "vm_name": "{{ user `vmname` }}", 77 | "communicator": "ssh", 78 | "iso_url": "{{ user `iso_url` }}", 79 | "iso_checksum": "{{ user `iso_checksum` }}", 80 | "iso_checksum_type": "sha1", 81 | "parallels_tools_flavor": "win", 82 | "parallels_tools_mode": "upload", 83 | "ssh_username": "{{ user `ssh_user` }}", 84 | "ssh_password": "{{ user `ssh_pwd` }}", 85 | "ssh_wait_timeout": "16h", 86 | "shutdown_command": "{{ user `shutdown_command`}}", 87 | "output_directory" : "{{ user `outputpath`}}-Parallels", 88 | "guest_os_type": "win-8", 89 | "prlctl": [ 90 | ["set", "{{.Name}}", "--memsize", "2048"], 91 | ["set", "{{.Name}}", "--cpus", "2"] 92 | ] 93 | } 94 | ] 95 | } 96 | -------------------------------------------------------------------------------- /scripts/template-parts/win81x64.json: -------------------------------------------------------------------------------- 1 | { 2 | "variables": { 3 | "version": "0.1.0", 4 | "shutdown_command": "cscript c:/windows/system32/slmgr.vbs /rearm & shutdown /s /f /d p:4:1", 5 | "update": "true" 6 | }, 7 | "builders": [ 8 | { 9 | "type": "hyperv-iso", 10 | "vm_name": "IE11 - Win81", 11 | "iso_url": "{{ user `iso_url` }}", 12 | "iso_checksum": "{{ user `iso_checksum` }}", 13 | "iso_checksum_type": "sha1", 14 | "ssh_username": "{{ user `ssh_user` }}", 15 | "ssh_password": "{{ user `ssh_pwd` }}", 16 | "ssh_timeout": "16h", 17 | "disk_size": 40960, 18 | "switch_name": "", 19 | "shutdown_command": "{{ user `shutdown_command`}}", 20 | "output_directory" : "..\\vms\\output\\IE11-Win81-HyperV" 21 | }, 22 | { 23 | "type": "virtualbox-iso", 24 | "vm_name": "IE11 - Win81", 25 | "communicator": "ssh", 26 | "iso_url": "{{ user `iso_url` }}", 27 | "iso_checksum": "{{ user `iso_checksum` }}", 28 | "iso_checksum_type": "sha1", 29 | "ssh_wait_timeout": "16h", 30 | "ssh_username": "{{ user `ssh_user` }}", 31 | "ssh_password": "{{ user `ssh_pwd` }}", 32 | "guest_os_type": "Windows81_64", 33 | "format" : "ova", 34 | "guest_additions_mode" : "attach", 35 | "output_directory" : "..\\vms\\output\\IE11-Win81-VirtualBox", 36 | "headless": "{{ user `headless` }}", 37 | "disk_size": 40960, 38 | "vboxmanage": [ 39 | [ 40 | "modifyvm", 41 | "{{.Name}}", 42 | "--memory", 43 | "4096" 44 | ] 45 | ], 46 | "shutdown_command": "{{ user `shutdown_command`}}" 47 | }, 48 | { 49 | "type": "vmware-iso", 50 | "vm_name": "IE11 - Win81", 51 | "iso_url": "{{ user `iso_url` }}", 52 | "iso_checksum": "{{ user `iso_checksum` }}", 53 | "iso_checksum_type": "sha1", 54 | "headless": true, 55 | "ssh_username": "{{ user `ssh_user` }}", 56 | "ssh_password": "{{ user `ssh_pwd` }}", 57 | "ssh_wait_timeout": "16h", 58 | "shutdown_command": "{{ user `shutdown_command`}}", 59 | "guest_os_type": "windows8-64", 60 | "boot_wait": "2m", 61 | "tools_upload_flavor": "windows", 62 | "output_directory" : "..\\vms\\output\\IE11-Win81-VMware-vmx", 63 | "disk_size": 40960, 64 | "vnc_port_min": 5900, 65 | "vnc_port_max": 5980, 66 | "vmx_data": { 67 | "RemoteDisplay.vnc.enabled": "false", 68 | "RemoteDisplay.vnc.port": "5900", 69 | "memsize": "4096", 70 | "numvcpus": "2", 71 | "scsi0.virtualDev": "lsisas1068" 72 | } 73 | }, 74 | { 75 | "type": "parallels-iso", 76 | "vm_name": "IE11 - Win81", 77 | "communicator": "ssh", 78 | "iso_url": "{{ user `iso_url` }}", 79 | "iso_checksum": "{{ user `iso_checksum` }}", 80 | "iso_checksum_type": "sha1", 81 | "parallels_tools_flavor": "win", 82 | "parallels_tools_mode": "upload", 83 | "ssh_username": "{{ user `ssh_user` }}", 84 | "ssh_password": "{{ user `ssh_pwd` }}", 85 | "ssh_wait_timeout": "16h", 86 | "shutdown_command": "{{ user `shutdown_command`}}", 87 | "output_directory" : "IE11-Win81-Parallels", 88 | "guest_os_type": "win-8.1", 89 | "prlctl": [ 90 | ["set", "{{.Name}}", "--memsize", "2048"], 91 | ["set", "{{.Name}}", "--cpus", "2"] 92 | ] 93 | } 94 | ] 95 | } 96 | -------------------------------------------------------------------------------- /scripts/vmsrename.ps1: -------------------------------------------------------------------------------- 1 | # -------------------------------------------------------------- 2 | # 3 | # dev.microsoftedge.com -VMs 4 | # Copyright(c) Microsoft Corporation. All rights reserved. 5 | # 6 | # MIT License 7 | # 8 | # Permission is hereby granted, free of charge, to any person obtaining 9 | # a copy of this software and associated documentation files(the ""Software""), 10 | # to deal in the Software without restriction, including without limitation the rights 11 | # to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies 12 | # of the Software, and to permit persons to whom the Software is furnished to do so, 13 | # subject to the following conditions : 14 | # 15 | # The above copyright notice and this permission notice shall be included 16 | # in all copies or substantial portions of the Software. 17 | # 18 | # THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 19 | # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 20 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS 21 | # OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 23 | # OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | # 25 | # -------------------------------------------------------------- 26 | 27 | 28 | param( 29 | [string] $OriginalName, 30 | [string] $NewName 31 | ) 32 | 33 | if([string]::IsNullOrEmpty($OriginalName) -or [string]::IsNullOrEmpty($NewName)){ 34 | Write-Output "The script requires 2 parameters, OriginalName and NewName." 35 | Write-Output "Example: rename from win10_preview to Windows 10 (x64) Build 34567 ->.\vmsrename.ps1 `"win10_preview`" `"Windows 10 (x64) Build 34567`" " 36 | exit 37 | } 38 | 39 | $file = (Get-Content "vms.json" -Raw) | ConvertFrom-Json 40 | 41 | $file.softwareList | 42 | ForEach-Object { 43 | $_.vms | 44 | ForEach-Object { 45 | if($_.osVersion -eq $OriginalName){ 46 | $_.osVersion = $NewName 47 | } 48 | } 49 | } 50 | 51 | $file | ConvertTo-Json -depth 100 | Out-File "vms_renamed.json" -------------------------------------------------------------------------------- /tools/VMSConfigGen/VMSConfigGen.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.26403.7 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VMSConfigGen", "VMSConfigGen\VMSConfigGen.csproj", "{4E0641BD-F94C-446F-A531-7D0E7007685C}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {4E0641BD-F94C-446F-A531-7D0E7007685C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {4E0641BD-F94C-446F-A531-7D0E7007685C}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {4E0641BD-F94C-446F-A531-7D0E7007685C}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {4E0641BD-F94C-446F-A531-7D0E7007685C}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /tools/VMSConfigGen/VMSConfigGen/ConfigGenerator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | using Newtonsoft.Json.Linq; 6 | 7 | namespace VMSConfigGen 8 | { 9 | internal class ConfigGenerator 10 | { 11 | Dictionary<Levels, List<string>> _selectedOptions; 12 | 13 | public ConfigGenerator(Dictionary<Levels, List<string>> parameters) 14 | { 15 | _selectedOptions = CreateDictionaryWithAllTheOptionsSelected(parameters); 16 | } 17 | 18 | public JObject CreateConfiguration() 19 | { 20 | JObject result = new JObject(); 21 | var node = CreateChildLevel(0, "VMS"); 22 | result["VMS"] = node; 23 | return result; 24 | } 25 | 26 | private JContainer CreateChildLevel(int level, string parentValue) 27 | { 28 | if (level == 3) 29 | { 30 | JArray array = new JArray(); 31 | foreach (var option in _selectedOptions[(Levels)level]) 32 | { 33 | if (Rules.IsValidCombination(level, option, parentValue)) 34 | { 35 | array.Add(option); 36 | } 37 | } 38 | return array; 39 | } 40 | else 41 | { 42 | JObject result = new JObject(); 43 | foreach (var option in _selectedOptions[(Levels)level]) 44 | { 45 | if (Rules.IsValidCombination(level, option, parentValue)) 46 | { 47 | var node = CreateChildLevel(level +1, option); 48 | if (node.Count != 0) 49 | { 50 | result[option] = node; 51 | } 52 | } 53 | } 54 | return result; 55 | } 56 | } 57 | 58 | private Dictionary<Levels, List<string>> CreateDictionaryWithAllTheOptionsSelected(Dictionary<Levels, List<string>> parameters) 59 | { 60 | var result = new Dictionary<Levels, List<string>>(); 61 | foreach (Levels level in Enum.GetValues(typeof(Levels))) 62 | { 63 | var content = parameters.ContainsKey(level) ? parameters[level] : Parameters.AcceptedParameters[level]; 64 | 65 | result.Add((Levels)level, content); 66 | } 67 | 68 | return result; 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /tools/VMSConfigGen/VMSConfigGen/Parameters.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace VMSConfigGen 7 | { 8 | internal class Parameters 9 | { 10 | public static Dictionary<Levels, List<string>> AcceptedParameters = new Dictionary<Levels, List<string>> 11 | { 12 | { Levels.OS, new List<string> (Enum.GetNames(typeof(OSs)))}, 13 | { Levels.VM, new List<string> (Enum.GetNames(typeof(VMs)))}, 14 | { Levels.Browser, new List<string> (Enum.GetNames(typeof(Browsers)))}, 15 | { Levels.WinVersion, new List<string> (Enum.GetNames(typeof(WinVersions)))} 16 | }; 17 | 18 | public static (bool success, Dictionary<Levels, List<string>> output, List<string> errors) TryToConvertToParameters(string[] parameters) 19 | { 20 | var wrongParameters = new List<string>(); 21 | var output = new Dictionary<Levels, List<string>>(); 22 | ; foreach (var param in parameters) 23 | { 24 | bool paramFound = false; 25 | foreach (Levels key in AcceptedParameters.Keys) 26 | { 27 | var element = AcceptedParameters[key].Find(x => x.ToLower() == param.ToLower()); 28 | if (!string.IsNullOrEmpty(element)) 29 | { 30 | if (!output.ContainsKey(key)) 31 | { 32 | output.Add(key, new List<string>()); 33 | } 34 | output[key].Add(element); 35 | paramFound = true; 36 | break; 37 | } 38 | } 39 | 40 | if (!paramFound) 41 | { 42 | wrongParameters.Add(param); 43 | } 44 | } 45 | 46 | return (!wrongParameters.Any(), output, wrongParameters); 47 | } 48 | 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /tools/VMSConfigGen/VMSConfigGen/Program.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json.Linq; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.IO; 5 | using System.Text; 6 | 7 | namespace VMSConfigGen 8 | { 9 | public class Program 10 | { 11 | static void Main(string[] args) 12 | { 13 | var parameters = new Parameters(); 14 | var result = Parameters.TryToConvertToParameters(args); 15 | if (result.success) 16 | { 17 | Console.WriteLine("Parameters validated successfully. Generating the file..."); 18 | var generator = new ConfigGenerator(result.output); 19 | var configuration = generator.CreateConfiguration(); 20 | 21 | string fileName = "VMSConfig.json"; 22 | File.WriteAllText(fileName, configuration.ToString()); 23 | Console.WriteLine(string.Format("File created: {0}\\{1}", Directory.GetCurrentDirectory(), fileName)); 24 | } 25 | else 26 | { 27 | LogError(result.errors); 28 | } 29 | } 30 | 31 | private static void LogError(List<string> errors) 32 | { 33 | var errorMessage = new StringBuilder(); 34 | errorMessage.AppendFormat("The next paramters are incorrect: {0} \n", string.Join(",", errors)); 35 | errorMessage.AppendLine("Accepted values are:"); 36 | foreach (var key in Parameters.AcceptedParameters.Keys) 37 | { 38 | errorMessage.AppendFormat("For {0} : {1} \n", key, string.Join(" ", Parameters.AcceptedParameters[key].ToArray())); 39 | } 40 | errorMessage.AppendLine("Format example: C:\\VMSConfigGen\\VMSConfigGen>dotnet run mac msedge"); 41 | 42 | Console.Write(errorMessage.ToString()); 43 | } 44 | } 45 | } -------------------------------------------------------------------------------- /tools/VMSConfigGen/VMSConfigGen/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "VMSConfigGen": { 4 | "commandName": "Project" 5 | } 6 | } 7 | } -------------------------------------------------------------------------------- /tools/VMSConfigGen/VMSConfigGen/Rules.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace VMSConfigGen 6 | { 7 | enum Levels 8 | { 9 | OS, 10 | VM, 11 | Browser, 12 | WinVersion 13 | } 14 | enum WinVersions 15 | { 16 | Win7, 17 | Win81, 18 | Win10 19 | } 20 | 21 | enum Browsers 22 | { 23 | IE8, 24 | IE9, 25 | IE10, 26 | IE11, 27 | MSEdge 28 | } 29 | 30 | enum VMs 31 | { 32 | HyperV, 33 | VirtualBox, 34 | VMware, 35 | Parallels, 36 | VPC 37 | } 38 | 39 | enum OSs 40 | { 41 | Windows, 42 | Mac 43 | } 44 | 45 | internal class Rules 46 | { 47 | public static readonly bool[,] WinVersionRules = 48 | { //Win7, Win81, Win10 49 | {true, false, false }, //IE8, 50 | {true, false, false }, //IE9, 51 | {true, false, false}, //IE10, 52 | {true, true, false }, //IE11, 53 | {false, false, true} //MSEdge 54 | }; 55 | 56 | public static readonly bool[,] VMRules = 57 | { 58 | //HyperV, VirtualBox, VMware, Parallels, VPC 59 | {true, true, true,false, true }, //Windows 60 | {false, true, true,true, false} // Mac 61 | }; 62 | 63 | public static bool IsValidCombination(int level, string value, string parentValue) 64 | { 65 | bool isValid = true; 66 | switch (level) 67 | { 68 | case 1: 69 | VMs vm = (VMs)Enum.Parse(typeof(VMs), value); 70 | OSs os = (OSs)Enum.Parse(typeof(OSs), parentValue); 71 | isValid = VMRules[(int)os, (int)vm]; 72 | break; 73 | 74 | case 3: 75 | WinVersions version = (WinVersions)Enum.Parse(typeof(WinVersions), value); 76 | Browsers browser = (Browsers)Enum.Parse(typeof(Browsers), parentValue); 77 | isValid = WinVersionRules[(int)browser, (int)version]; 78 | break; 79 | 80 | default: 81 | break; 82 | } 83 | return isValid; 84 | } 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /tools/VMSConfigGen/VMSConfigGen/VMSConfigGen.csproj: -------------------------------------------------------------------------------- 1 | <Project Sdk="Microsoft.NET.Sdk"> 2 | 3 | <PropertyGroup> 4 | <OutputType>exe</OutputType> 5 | <TargetFramework>netcoreapp1.1</TargetFramework> 6 | <ApplicationIcon /> 7 | <OutputTypeEx>exe</OutputTypeEx> 8 | <StartupObject /> 9 | </PropertyGroup> 10 | 11 | <ItemGroup> 12 | <PackageReference Include="Newtonsoft.Json" Version="10.0.2" /> 13 | <PackageReference Include="System.ValueTuple" Version="4.3.1" /> 14 | </ItemGroup> 15 | 16 | </Project> -------------------------------------------------------------------------------- /tools/VMSGen/VMSGen.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.23107.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VMSGen", "VMSGen\VMSGen.csproj", "{DFF9B4D9-7379-433A-A6A4-8255E03AD726}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {DFF9B4D9-7379-433A-A6A4-8255E03AD726}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {DFF9B4D9-7379-433A-A6A4-8255E03AD726}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {DFF9B4D9-7379-433A-A6A4-8255E03AD726}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {DFF9B4D9-7379-433A-A6A4-8255E03AD726}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /tools/VMSGen/VMSGen/App.config: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="utf-8" ?> 2 | <configuration> 3 | <startup> 4 | <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" /> 5 | </startup> 6 | </configuration> -------------------------------------------------------------------------------- /tools/VMSGen/VMSGen/Model/Browser.cs: -------------------------------------------------------------------------------- 1 | // -------------------------------------------------------------- 2 | // 3 | // dev.microsoftedge.com -VMs 4 | // Copyright(c) Microsoft Corporation. All rights reserved. 5 | // 6 | // MIT License 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining 9 | // a copy of this software and associated documentation files(the ""Software""), 10 | // to deal in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies 12 | // of the Software, and to permit persons to whom the Software is furnished to do so, 13 | // subject to the following conditions : 14 | // 15 | // The above copyright notice and this permission notice shall be included 16 | // in all copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 19 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 20 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS 21 | // OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 23 | // OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | // 25 | // -------------------------------------------------------------- 26 | 27 | using Newtonsoft.Json; 28 | 29 | namespace VMSGen.Model 30 | { 31 | public class Browser 32 | { 33 | [JsonProperty(PropertyName = "version")] 34 | public string Version { get; set; } 35 | 36 | [JsonProperty(PropertyName = "build")] 37 | public string Build { get; set; } 38 | 39 | [JsonProperty(PropertyName = "osVersion")] 40 | public string OSVersion { get; set; } 41 | 42 | [JsonProperty(PropertyName = "browserName")] 43 | public string BrowserName { get; set; } 44 | 45 | [JsonProperty(PropertyName = "files")] 46 | public File[] Files { get; set; } 47 | } 48 | } -------------------------------------------------------------------------------- /tools/VMSGen/VMSGen/Model/File.cs: -------------------------------------------------------------------------------- 1 | // -------------------------------------------------------------- 2 | // 3 | // dev.microsoftedge.com -VMs 4 | // Copyright(c) Microsoft Corporation. All rights reserved. 5 | // 6 | // MIT License 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining 9 | // a copy of this software and associated documentation files(the ""Software""), 10 | // to deal in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies 12 | // of the Software, and to permit persons to whom the Software is furnished to do so, 13 | // subject to the following conditions : 14 | // 15 | // The above copyright notice and this permission notice shall be included 16 | // in all copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 19 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 20 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS 21 | // OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 23 | // OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | // 25 | // -------------------------------------------------------------- 26 | 27 | using Newtonsoft.Json; 28 | 29 | namespace VMSGen.Model 30 | { 31 | public class File 32 | { 33 | [JsonProperty(PropertyName = "name")] 34 | public string Name { get; set; } 35 | 36 | [JsonProperty(PropertyName = "url")] 37 | public string Url { get; set; } 38 | 39 | [JsonProperty(PropertyName = "md5")] 40 | public string MD5 { get; internal set; } 41 | } 42 | } -------------------------------------------------------------------------------- /tools/VMSGen/VMSGen/Model/OS.cs: -------------------------------------------------------------------------------- 1 | // -------------------------------------------------------------- 2 | // 3 | // dev.microsoftedge.com -VMs 4 | // Copyright(c) Microsoft Corporation. All rights reserved. 5 | // 6 | // MIT License 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining 9 | // a copy of this software and associated documentation files(the ""Software""), 10 | // to deal in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies 12 | // of the Software, and to permit persons to whom the Software is furnished to do so, 13 | // subject to the following conditions : 14 | // 15 | // The above copyright notice and this permission notice shall be included 16 | // in all copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 19 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 20 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS 21 | // OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 23 | // OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | // 25 | // -------------------------------------------------------------- 26 | 27 | namespace VMSGen.Model 28 | { 29 | using Newtonsoft.Json; 30 | 31 | public class OS 32 | { 33 | [JsonProperty(PropertyName = "osName")] 34 | public string OSName { get; set; } 35 | } 36 | } -------------------------------------------------------------------------------- /tools/VMSGen/VMSGen/Model/Software.cs: -------------------------------------------------------------------------------- 1 | // -------------------------------------------------------------- 2 | // 3 | // dev.microsoftedge.com -VMs 4 | // Copyright(c) Microsoft Corporation. All rights reserved. 5 | // 6 | // MIT License 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining 9 | // a copy of this software and associated documentation files(the ""Software""), 10 | // to deal in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies 12 | // of the Software, and to permit persons to whom the Software is furnished to do so, 13 | // subject to the following conditions : 14 | // 15 | // The above copyright notice and this permission notice shall be included 16 | // in all copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 19 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 20 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS 21 | // OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 23 | // OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | // 25 | // -------------------------------------------------------------- 26 | 27 | namespace VMSGen.Model 28 | { 29 | using Newtonsoft.Json; 30 | using System.Collections.Generic; 31 | 32 | public class Software 33 | { 34 | [JsonProperty(PropertyName = "softwareName")] 35 | public string SoftwareName { get; set; } 36 | 37 | [JsonProperty(PropertyName = "osList")] 38 | public string[] OsList { get; set; } 39 | 40 | [JsonProperty(PropertyName = "vms")] 41 | public IList<Browser> VMS { get; set; } 42 | } 43 | } -------------------------------------------------------------------------------- /tools/VMSGen/VMSGen/Model/VMS.cs: -------------------------------------------------------------------------------- 1 | // -------------------------------------------------------------- 2 | // 3 | // dev.microsoftedge.com -VMs 4 | // Copyright(c) Microsoft Corporation. All rights reserved. 5 | // 6 | // MIT License 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining 9 | // a copy of this software and associated documentation files(the ""Software""), 10 | // to deal in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies 12 | // of the Software, and to permit persons to whom the Software is furnished to do so, 13 | // subject to the following conditions : 14 | // 15 | // The above copyright notice and this permission notice shall be included 16 | // in all copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 19 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 20 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS 21 | // OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 23 | // OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | // 25 | // -------------------------------------------------------------- 26 | 27 | namespace VMSGen.Model 28 | { 29 | using Newtonsoft.Json; 30 | using System.Collections.Generic; 31 | 32 | public class VMS 33 | { 34 | [JsonProperty(PropertyName = "id")] 35 | public string Id { get; set; } 36 | 37 | [JsonProperty(PropertyName = "releaseNotes")] 38 | public string ReleaseNotes { get; set; } 39 | 40 | [JsonProperty(PropertyName = "softwareList")] 41 | public List<Software> SoftwareList { get; set; } 42 | 43 | [JsonProperty(PropertyName = "version")] 44 | public string Version { get; set; } 45 | 46 | [JsonProperty(PropertyName = "active")] 47 | public bool Active { get; set; } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /tools/VMSGen/VMSGen/Program.cs: -------------------------------------------------------------------------------- 1 | // -------------------------------------------------------------- 2 | // 3 | // dev.microsoftedge.com -VMs 4 | // Copyright(c) Microsoft Corporation. All rights reserved. 5 | // 6 | // MIT License 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining 9 | // a copy of this software and associated documentation files(the ""Software""), 10 | // to deal in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies 12 | // of the Software, and to permit persons to whom the Software is furnished to do so, 13 | // subject to the following conditions : 14 | // 15 | // The above copyright notice and this permission notice shall be included 16 | // in all copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 19 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 20 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS 21 | // OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 23 | // OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | // 25 | // -------------------------------------------------------------- 26 | 27 | using Microsoft.CSharp.RuntimeBinder; 28 | 29 | namespace VMSGen 30 | { 31 | using Model; 32 | using Newtonsoft.Json; 33 | using Newtonsoft.Json.Linq; 34 | using System; 35 | using System.IO; 36 | using System.Linq; 37 | 38 | class Program 39 | { 40 | static void Main(string[] args) 41 | { 42 | try 43 | { 44 | var file = args.Length == 2 ? args[1] : "vmgen.json"; 45 | 46 | var config = GetConfig(file); 47 | var generator = new VmsJsonGenerator(config); 48 | var vms = generator.CreateVms(); 49 | CreateOutputFile(config.OutputPath.ToString(), vms); 50 | 51 | Merge(config.OutputPath.ToString(), vms); 52 | } 53 | catch (Exception e) 54 | { 55 | Console.WriteLine($"ERROR: {e.Message}"); 56 | } 57 | } 58 | 59 | private static void Merge(string path, VMS vms) 60 | { 61 | var originPath = Path.Combine(path, "vms.json"); 62 | var generatedPath = Path.Combine(path, $"vms_{vms.Version}.json"); 63 | var ouputPath = Path.Combine(path, $"vms.json"); 64 | 65 | if (!System.IO.File.Exists(originPath)) 66 | { 67 | System.IO.File.Copy(generatedPath, ouputPath); 68 | return; 69 | } 70 | 71 | var origin = System.IO.File.ReadAllText(originPath); 72 | var jsonOrigin = JsonConvert.DeserializeObject<VMS>(origin); 73 | var generated = System.IO.File.ReadAllText(generatedPath); 74 | var jsonGenerated = JsonConvert.DeserializeObject<VMS>(generated); 75 | 76 | MergeInto(jsonOrigin, jsonGenerated); 77 | 78 | string json = JsonConvert.SerializeObject(jsonOrigin, Formatting.Indented, new JsonSerializerSettings 79 | { 80 | NullValueHandling = NullValueHandling.Ignore 81 | }); 82 | System.IO.File.WriteAllText(ouputPath, json); 83 | } 84 | 85 | private static void MergeInto(VMS left, VMS right) 86 | { 87 | left.Id = right.Id; 88 | left.Version = right.Version; 89 | 90 | foreach (var softListRight in right.SoftwareList) 91 | { 92 | var softListLeft = left.SoftwareList.FirstOrDefault(x => x.SoftwareName == softListRight.SoftwareName); 93 | 94 | if (softListLeft == null) 95 | { 96 | left.SoftwareList.Add(softListRight); 97 | } 98 | else 99 | { 100 | foreach (var item in softListRight.VMS) 101 | { 102 | var softListLeftVMS = softListLeft.VMS.FirstOrDefault(x => x.Version == item.Version && x.OSVersion == item.OSVersion); 103 | 104 | if (softListLeftVMS != null) 105 | { 106 | softListLeft.VMS.Remove(softListLeftVMS); 107 | } 108 | 109 | softListLeft.VMS.Add(item); 110 | } 111 | } 112 | } 113 | } 114 | 115 | private static dynamic GetConfig(string file) 116 | { 117 | var input = System.IO.File.ReadAllText(file); 118 | return JsonConvert.DeserializeObject(input); 119 | } 120 | 121 | private static void CreateOutputFile(string path, VMS vms) 122 | { 123 | var fileName = $"vms_{vms.Version}.json"; 124 | var fileFullPath = Path.Combine(path, fileName); 125 | 126 | string json = JsonConvert.SerializeObject(vms, 127 | Formatting.Indented, 128 | new JsonSerializerSettings 129 | { 130 | NullValueHandling = NullValueHandling.Ignore 131 | }); 132 | System.IO.File.WriteAllText(fileFullPath, json); 133 | 134 | Console.WriteLine($"{fileFullPath} created"); 135 | } 136 | } 137 | } 138 | -------------------------------------------------------------------------------- /tools/VMSGen/VMSGen/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("GenerateSoftwareList")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("GenerateSoftwareList")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("dff9b4d9-7379-433a-a6a4-8255e03ad726")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /tools/VMSGen/VMSGen/VMSGen.csproj: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="utf-8"?> 2 | <Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 3 | <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> 4 | <PropertyGroup> 5 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> 6 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> 7 | <ProjectGuid>{DFF9B4D9-7379-433A-A6A4-8255E03AD726}</ProjectGuid> 8 | <OutputType>Exe</OutputType> 9 | <AppDesignerFolder>Properties</AppDesignerFolder> 10 | <RootNamespace>VMSGen</RootNamespace> 11 | <AssemblyName>VMSGen</AssemblyName> 12 | <TargetFrameworkVersion>v4.6</TargetFrameworkVersion> 13 | <FileAlignment>512</FileAlignment> 14 | <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> 15 | </PropertyGroup> 16 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> 17 | <PlatformTarget>AnyCPU</PlatformTarget> 18 | <DebugSymbols>true</DebugSymbols> 19 | <DebugType>full</DebugType> 20 | <Optimize>false</Optimize> 21 | <OutputPath>bin\Debug\</OutputPath> 22 | <DefineConstants>DEBUG;TRACE</DefineConstants> 23 | <ErrorReport>prompt</ErrorReport> 24 | <WarningLevel>4</WarningLevel> 25 | </PropertyGroup> 26 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> 27 | <PlatformTarget>AnyCPU</PlatformTarget> 28 | <DebugType>pdbonly</DebugType> 29 | <Optimize>true</Optimize> 30 | <OutputPath>bin\Release\</OutputPath> 31 | <DefineConstants>TRACE</DefineConstants> 32 | <ErrorReport>prompt</ErrorReport> 33 | <WarningLevel>4</WarningLevel> 34 | </PropertyGroup> 35 | <ItemGroup> 36 | <Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> 37 | <HintPath>..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll</HintPath> 38 | <Private>True</Private> 39 | </Reference> 40 | <Reference Include="System" /> 41 | <Reference Include="System.Core" /> 42 | <Reference Include="System.Xml.Linq" /> 43 | <Reference Include="System.Data.DataSetExtensions" /> 44 | <Reference Include="Microsoft.CSharp" /> 45 | <Reference Include="System.Data" /> 46 | <Reference Include="System.Net.Http" /> 47 | <Reference Include="System.Xml" /> 48 | </ItemGroup> 49 | <ItemGroup> 50 | <Compile Include="VmsJsonGenerator.cs" /> 51 | <Compile Include="Model\Browser.cs" /> 52 | <Compile Include="Model\File.cs" /> 53 | <Compile Include="Model\OS.cs" /> 54 | <Compile Include="Program.cs" /> 55 | <Compile Include="Properties\AssemblyInfo.cs" /> 56 | <Compile Include="Model\Software.cs" /> 57 | <Compile Include="Model\VMS.cs" /> 58 | </ItemGroup> 59 | <ItemGroup> 60 | <None Include="App.config" /> 61 | <None Include="vmgen.json"> 62 | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 63 | </None> 64 | <None Include="packages.config" /> 65 | </ItemGroup> 66 | <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> 67 | <PropertyGroup> 68 | <PostBuildEvent>xcopy /i "$(TargetDir)*.*" "$(TargetDir)..\..\..\..\..\bin\VMSGen" /y</PostBuildEvent> 69 | </PropertyGroup> 70 | <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 71 | Other similar extension points exist, see Microsoft.Common.targets. 72 | <Target Name="BeforeBuild"> 73 | </Target> 74 | <Target Name="AfterBuild"> 75 | </Target> 76 | --> 77 | </Project> -------------------------------------------------------------------------------- /tools/VMSGen/VMSGen/VmsJsonGenerator.cs: -------------------------------------------------------------------------------- 1 | // -------------------------------------------------------------- 2 | // 3 | // dev.microsoftedge.com -VMs 4 | // Copyright(c) Microsoft Corporation. All rights reserved. 5 | // 6 | // MIT License 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining 9 | // a copy of this software and associated documentation files(the ""Software""), 10 | // to deal in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies 12 | // of the Software, and to permit persons to whom the Software is furnished to do so, 13 | // subject to the following conditions : 14 | // 15 | // The above copyright notice and this permission notice shall be included 16 | // in all copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 19 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 20 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS 21 | // OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 23 | // OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | // 25 | // -------------------------------------------------------------- 26 | 27 | using Newtonsoft.Json.Linq; 28 | 29 | namespace VMSGen 30 | { 31 | using Model; 32 | using System; 33 | using System.Collections.Generic; 34 | using System.IO; 35 | using System.Linq; 36 | 37 | public class VmsJsonGenerator 38 | { 39 | const string DomainCdn = "https://az792536.vo.msecnd.net"; 40 | const string ReleaseNotesUrl = "https://az792536.vo.msecnd.net/vms/release_notes_license_terms_8_1_15.pdf"; 41 | private readonly string _rootPath; 42 | private readonly string _buildId; 43 | private readonly dynamic _vms; 44 | 45 | public VmsJsonGenerator(dynamic config) 46 | { 47 | _buildId = config.Build; 48 | _rootPath = config.OutputPath; 49 | _vms = config.VMS; 50 | 51 | if (string.IsNullOrEmpty(_buildId)) throw new NullReferenceException("'Build' cannot be null."); 52 | if (string.IsNullOrEmpty(_rootPath)) throw new NullReferenceException("'OutputPath' cannot be null."); 53 | 54 | var vmsJtoken = _vms as JToken; 55 | if (vmsJtoken == null || !vmsJtoken.HasValues) throw new NullReferenceException("'VMS' cannot be null."); 56 | } 57 | 58 | public VMS CreateVms() 59 | { 60 | var resultVms = new VMS { Id = _buildId, ReleaseNotes = ReleaseNotesUrl, Active = true, Version = _buildId }; 61 | resultVms.SoftwareList = new List<Software>(); 62 | var osList = new List<OS>(); 63 | 64 | foreach (var osName in _vms) 65 | { 66 | var softwareList = new List<Software>(); 67 | 68 | foreach (var softwareName in osName.Value) 69 | { 70 | GenerateSoftwareList(softwareList, softwareName); 71 | if (softwareName.Name == "VirtualBox") 72 | { 73 | dynamic a = new JObject(); 74 | a.Vagrant = softwareName.Value; 75 | GenerateSoftwareList(softwareList, ((JContainer)a).First); 76 | } 77 | } 78 | 79 | foreach (var softwareItem in softwareList) 80 | { 81 | MergeSoftwareItems(resultVms.SoftwareList, softwareItem); 82 | // resultVms.SoftwareList.AddRange(softwareList.ToArray()); 83 | } 84 | } 85 | 86 | return resultVms; 87 | } 88 | 89 | private void MergeSoftwareItems(List<Software> softwareList, Software softwareItem) 90 | { 91 | var software = softwareList.FirstOrDefault(x => x.SoftwareName == softwareItem.SoftwareName); 92 | 93 | if (software == null) 94 | { 95 | softwareList.Add(softwareItem); 96 | } 97 | else 98 | { 99 | foreach (var browser in softwareItem.VMS) 100 | { 101 | if (software.VMS.SingleOrDefault(vms => AreTheSameBrowserValues(vms, browser)) == null) 102 | { 103 | software.VMS.Add(browser); 104 | } 105 | } 106 | } 107 | } 108 | 109 | private static bool AreTheSameBrowserValues(Browser vms, Browser browser) 110 | { 111 | return vms.BrowserName == browser.BrowserName 112 | && vms.Build == browser.Build 113 | && vms.OSVersion == browser.OSVersion 114 | && vms.Version == browser.Version; 115 | } 116 | 117 | 118 | private void GenerateSoftwareList(List<Software> softwareList, dynamic softwareName) 119 | { 120 | var software = new Software { SoftwareName = softwareName.Name }; 121 | var browserList = new List<Browser>(); 122 | 123 | foreach (var browserVersion in softwareName.Value) 124 | { 125 | foreach (var osVersion in browserVersion.Value) 126 | { 127 | var browser = CreateBrowser(software, browserVersion.Name, osVersion.ToString()); 128 | browserList.Add(browser); 129 | } 130 | } 131 | software.VMS = browserList.ToArray(); 132 | software.OsList = GetOSList(software); 133 | softwareList.Add(software); 134 | } 135 | 136 | private string[] GetOSList(Software software) 137 | { 138 | switch (software.SoftwareName) 139 | { 140 | case "VirtualBox": 141 | return new[] { "Windows", "Mac", "Linux" }; 142 | 143 | case "Vagrant": 144 | return new[] { "Windows", "Mac", "Linux" }; 145 | 146 | case "VMware": 147 | return new[] { "Windows", "Mac" }; 148 | 149 | case "Parallels": 150 | return new[] { "Mac" }; 151 | 152 | default: 153 | return new[] { "Windows" }; 154 | } 155 | } 156 | 157 | private Browser CreateBrowser(Software software, string browserVersionName, string osVersion) 158 | { 159 | var browser = new Browser { Version = browserVersionName.ToLower(), BrowserName = browserVersionName, OSVersion = osVersion, Build = _buildId }; 160 | var relativePath = $"{software.SoftwareName}\\{browser.Version}"; 161 | var absolutePath = Path.Combine(_rootPath, "VMBuild_" + _buildId, relativePath); 162 | var filters = new[] { $"{browser.BrowserName}.{browser.OSVersion}*.zip", $"{browser.BrowserName}.{browser.OSVersion}*.0??" }; 163 | var fileList = new List<Model.File>(); 164 | var filesMultipart = GetFileList(_buildId, software, browserVersionName, browser, absolutePath, filters[1]); 165 | 166 | fileList.AddRange(GetFileList(_buildId, software, browserVersionName, browser, absolutePath, filters[0])); 167 | fileList.AddRange(filesMultipart); 168 | 169 | browser.Files = fileList.ToArray(); 170 | return browser; 171 | } 172 | 173 | private static List<Model.File> GetFileList(string buildId, Software software, string browserVersion, Browser browser, string absolutePath, string fileFilter) 174 | { 175 | if (!Directory.Exists(absolutePath)) return new List<Model.File>(); 176 | 177 | var files = Directory.GetFiles(absolutePath, fileFilter); 178 | 179 | var fileList = new List<Model.File>(); 180 | 181 | foreach (var file in files) 182 | { 183 | var fileZip = new Model.File { Name = Path.GetFileName(file) }; 184 | fileZip.Url = $"{DomainCdn}/vms/VMBuild_{buildId}/{software.SoftwareName}/{browserVersion}/{fileZip.Name}"; 185 | fileZip.MD5 = $"{DomainCdn}/vms/md5/VMBuild_{buildId}/{fileZip.Name}.md5.txt"; 186 | 187 | fileList.Add(fileZip); 188 | } 189 | 190 | Console.WriteLine($"Processed {files.Count()} files ({fileFilter.Substring(fileFilter.Length - 3, 3)}) in {absolutePath}"); 191 | 192 | return fileList; 193 | } 194 | } 195 | } 196 | -------------------------------------------------------------------------------- /tools/VMSGen/VMSGen/packages.config: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="utf-8"?> 2 | <packages> 3 | <package id="Newtonsoft.Json" version="7.0.1" targetFramework="net452" /> 4 | </packages> -------------------------------------------------------------------------------- /tools/VMSGen/VMSGen/vmgen.json: -------------------------------------------------------------------------------- 1 | { 2 | "Build": "20150916", 3 | "OutputPath": "E:\\ModernIE\\vms", 4 | "VMS": { 5 | "Windows": { 6 | "VirtualBox": { 7 | "IE9": [ 8 | "Win7" 9 | ], 10 | "IE10": [ 11 | "Win7" 12 | ], 13 | "IE11": [ 14 | "Win7", 15 | "Win81" 16 | ], 17 | "MSEdge": [ 18 | "Win10", 19 | "Win10_preview" 20 | ] 21 | }, 22 | "HyperV": { 23 | "IE9": [ 24 | "Win7" 25 | ], 26 | "IE10": [ 27 | "Win7" 28 | ], 29 | "IE11": [ 30 | "Win7", 31 | "Win81" 32 | ], 33 | "MSEdge": [ 34 | "Win10", 35 | "Win10_preview" 36 | ] 37 | }, 38 | "VPC": { 39 | "IE9": [ 40 | "Win7" 41 | ], 42 | "IE10": [ 43 | "Win7" 44 | ], 45 | "IE11": [ 46 | "Win7" 47 | ] 48 | }, 49 | "VMware": { 50 | "IE9": [ 51 | "Win7" 52 | ], 53 | "IE10": [ 54 | "Win7" 55 | ], 56 | "IE11": [ 57 | "Win7", 58 | "Win81" 59 | ], 60 | "MSEdge": [ 61 | "Win10", 62 | "Win10_preview" 63 | ] 64 | } 65 | }, 66 | "Mac": { 67 | "Parallels": { 68 | "IE9": [ 69 | "Win7" 70 | ], 71 | "IE10": [ 72 | "Win7" 73 | ], 74 | "IE11": [ 75 | "Win7", 76 | "Win81" 77 | ], 78 | "MSEdge": [ 79 | "Win10", 80 | "Win10_preview" 81 | ] 82 | } 83 | } 84 | } 85 | } -------------------------------------------------------------------------------- /tools/packermerge/PackerMerge.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.23107.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PackerMerge", "PackerMerge\PackerMerge.csproj", "{DDDE4D9B-8B6E-48E2-911B-BA715F253014}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {DDDE4D9B-8B6E-48E2-911B-BA715F253014}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {DDDE4D9B-8B6E-48E2-911B-BA715F253014}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {DDDE4D9B-8B6E-48E2-911B-BA715F253014}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {DDDE4D9B-8B6E-48E2-911B-BA715F253014}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /tools/packermerge/PackerMerge/App.config: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="utf-8" ?> 2 | <configuration> 3 | <startup> 4 | <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" /> 5 | </startup> 6 | </configuration> -------------------------------------------------------------------------------- /tools/packermerge/PackerMerge/CombinatorStrategyAdd.cs: -------------------------------------------------------------------------------- 1 | // -------------------------------------------------------------- 2 | // 3 | // dev.microsoftedge.com -VMs 4 | // Copyright(c) Microsoft Corporation. All rights reserved. 5 | // 6 | // MIT License 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining 9 | // a copy of this software and associated documentation files(the ""Software""), 10 | // to deal in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies 12 | // of the Software, and to permit persons to whom the Software is furnished to do so, 13 | // subject to the following conditions : 14 | // 15 | // The above copyright notice and this permission notice shall be included 16 | // in all copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 19 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 20 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS 21 | // OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 23 | // OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | // 25 | // -------------------------------------------------------------- 26 | 27 | 28 | using System; 29 | using System.Collections.Generic; 30 | using System.Linq; 31 | using System.Threading.Tasks; 32 | using Newtonsoft.Json.Linq; 33 | 34 | namespace PackerMerge 35 | { 36 | public static class CombinatorStrategyAdd 37 | { 38 | public static PackerTemplate Combine(PackerTemplate current, PackerTemplate extraData) 39 | { 40 | if (extraData.Variables != null) 41 | { 42 | MergeVariables(current, extraData); 43 | } 44 | 45 | if (extraData.Builders != null) 46 | { 47 | MergeBuilders(current, extraData); 48 | } 49 | 50 | if (extraData.Provisioners != null) 51 | { 52 | MergeProvisioners(current, extraData); 53 | } 54 | 55 | if (extraData.Postprocessors != null) 56 | { 57 | MergePostprocessors(current, extraData); 58 | } 59 | 60 | 61 | return current; 62 | } 63 | 64 | private static void MergeVariables(PackerTemplate current, PackerTemplate extraData) 65 | { 66 | if (current.Variables == null) 67 | { 68 | current.Variables = extraData.Variables.DeepClone(); 69 | } 70 | else 71 | { 72 | foreach (var variable in extraData.Variables) 73 | { 74 | current.Variables.Add(variable); 75 | } 76 | } 77 | } 78 | 79 | private static void MergeBuilders(PackerTemplate current, PackerTemplate extraData) 80 | { 81 | if (current.Builders == null) 82 | { 83 | current.Builders = extraData.Builders.DeepClone(); 84 | } 85 | else 86 | { 87 | foreach (var builderRight in extraData.Builders) 88 | { 89 | var type = builderRight.type; 90 | foreach (var builderLeft in current.Builders) 91 | { 92 | var typeLeft = builderLeft.type; 93 | 94 | if (type == typeLeft) 95 | { 96 | MergeInto(builderLeft, builderRight); 97 | } 98 | } 99 | } 100 | } 101 | } 102 | 103 | private static void MergeProvisioners(PackerTemplate current, PackerTemplate extraData) 104 | { 105 | if (current.Provisioners == null) 106 | { 107 | current.Provisioners = extraData.Provisioners.DeepClone(); 108 | } 109 | else 110 | { 111 | foreach (var provisioner in extraData.Provisioners) 112 | { 113 | current.Provisioners.Add(provisioner); 114 | } 115 | } 116 | } 117 | 118 | private static void MergePostprocessors(PackerTemplate current, PackerTemplate extraData) 119 | { 120 | if (current.Postprocessors == null) 121 | { 122 | current.Postprocessors = extraData.Postprocessors.DeepClone(); 123 | } 124 | else 125 | { 126 | foreach (var postProcessor in extraData.Postprocessors) 127 | { 128 | current.Provisioners.Add(postProcessor); 129 | } 130 | } 131 | } 132 | 133 | public static void MergeInto(this JContainer left, JToken right) 134 | { 135 | foreach (var rightChild in right.Children<JProperty>()) 136 | { 137 | var rightChildProperty = rightChild; 138 | var leftProperty = left.SelectToken(rightChildProperty.Name); 139 | 140 | if (leftProperty == null) 141 | { 142 | left.Add(rightChild); 143 | } 144 | else 145 | { 146 | var leftObject = leftProperty as JObject; 147 | if (leftObject == null) 148 | { 149 | var leftParent = (JProperty)leftProperty.Parent; 150 | 151 | if (leftParent.Value.GetType() == typeof(JArray)) 152 | { 153 | leftParent.Value = JToken.FromObject(leftParent.Value.Concat(rightChildProperty.Value)); 154 | } 155 | else 156 | { 157 | leftParent.Value = rightChildProperty.Value; 158 | } 159 | } 160 | 161 | else 162 | MergeInto(leftObject, rightChildProperty.Value); 163 | } 164 | } 165 | } 166 | } 167 | } 168 | -------------------------------------------------------------------------------- /tools/packermerge/PackerMerge/PackerMerge.csproj: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="utf-8"?> 2 | <Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 3 | <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> 4 | <PropertyGroup> 5 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> 6 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> 7 | <ProjectGuid>{DDDE4D9B-8B6E-48E2-911B-BA715F253014}</ProjectGuid> 8 | <OutputType>Exe</OutputType> 9 | <AppDesignerFolder>Properties</AppDesignerFolder> 10 | <RootNamespace>PackerMerge</RootNamespace> 11 | <AssemblyName>PackerMerge</AssemblyName> 12 | <TargetFrameworkVersion>v4.6</TargetFrameworkVersion> 13 | <FileAlignment>512</FileAlignment> 14 | <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> 15 | </PropertyGroup> 16 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> 17 | <PlatformTarget>AnyCPU</PlatformTarget> 18 | <DebugSymbols>true</DebugSymbols> 19 | <DebugType>full</DebugType> 20 | <Optimize>false</Optimize> 21 | <OutputPath>bin\Debug\</OutputPath> 22 | <DefineConstants>DEBUG;TRACE</DefineConstants> 23 | <ErrorReport>prompt</ErrorReport> 24 | <WarningLevel>4</WarningLevel> 25 | </PropertyGroup> 26 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> 27 | <PlatformTarget>AnyCPU</PlatformTarget> 28 | <DebugType>pdbonly</DebugType> 29 | <Optimize>true</Optimize> 30 | <OutputPath>bin\Release\</OutputPath> 31 | <DefineConstants>TRACE</DefineConstants> 32 | <ErrorReport>prompt</ErrorReport> 33 | <WarningLevel>4</WarningLevel> 34 | <UseVSHostingProcess>false</UseVSHostingProcess> 35 | </PropertyGroup> 36 | <ItemGroup> 37 | <Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> 38 | <HintPath>..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll</HintPath> 39 | <Private>True</Private> 40 | </Reference> 41 | <Reference Include="System" /> 42 | <Reference Include="System.Core" /> 43 | <Reference Include="System.Xml.Linq" /> 44 | <Reference Include="System.Data.DataSetExtensions" /> 45 | <Reference Include="Microsoft.CSharp" /> 46 | <Reference Include="System.Data" /> 47 | <Reference Include="System.Net.Http" /> 48 | <Reference Include="System.Xml" /> 49 | </ItemGroup> 50 | <ItemGroup> 51 | <Compile Include="CombinatorStrategyAdd.cs" /> 52 | <Compile Include="PackerTemplate.cs" /> 53 | <Compile Include="PackerTemplateCombinator.cs" /> 54 | <Compile Include="Parameters.cs" /> 55 | <Compile Include="Program.cs" /> 56 | <Compile Include="Properties\AssemblyInfo.cs" /> 57 | </ItemGroup> 58 | <ItemGroup> 59 | <None Include="App.config" /> 60 | <None Include="template.json" /> 61 | </ItemGroup> 62 | <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> 63 | <PropertyGroup> 64 | <PreBuildEvent> 65 | </PreBuildEvent> 66 | </PropertyGroup> 67 | <PropertyGroup> 68 | <PostBuildEvent>xcopy /i "$(TargetDir)*.*" "$(TargetDir)..\..\..\..\..\bin\PackerMerge" /y</PostBuildEvent> 69 | </PropertyGroup> 70 | <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 71 | Other similar extension points exist, see Microsoft.Common.targets. 72 | <Target Name="BeforeBuild"> 73 | </Target> 74 | <Target Name="AfterBuild"> 75 | </Target> 76 | --> 77 | </Project> -------------------------------------------------------------------------------- /tools/packermerge/PackerMerge/PackerTemplate.cs: -------------------------------------------------------------------------------- 1 | // -------------------------------------------------------------- 2 | // 3 | // dev.microsoftedge.com -VMs 4 | // Copyright(c) Microsoft Corporation. All rights reserved. 5 | // 6 | // MIT License 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining 9 | // a copy of this software and associated documentation files(the ""Software""), 10 | // to deal in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies 12 | // of the Software, and to permit persons to whom the Software is furnished to do so, 13 | // subject to the following conditions : 14 | // 15 | // The above copyright notice and this permission notice shall be included 16 | // in all copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 19 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 20 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS 21 | // OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 23 | // OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | // 25 | // -------------------------------------------------------------- 26 | 27 | using System; 28 | using System.Collections.Generic; 29 | using System.IO; 30 | using System.Linq; 31 | using System.Threading.Tasks; 32 | using Newtonsoft.Json; 33 | using Newtonsoft.Json.Linq; 34 | 35 | namespace PackerMerge 36 | { 37 | public class PackerTemplate 38 | { 39 | 40 | public dynamic Variables { get; set; } 41 | 42 | public dynamic Builders { get; set; } 43 | 44 | public dynamic Provisioners { get; set; } 45 | 46 | public dynamic Postprocessors { get; set; } 47 | 48 | public static PackerTemplate ReadFrom(string file) 49 | { 50 | var template = new PackerTemplate(); 51 | dynamic jsonData = JObject.Parse(File.ReadAllText(file)); 52 | template.Variables = jsonData.variables; 53 | template.Builders = jsonData.builders; 54 | template.Provisioners = jsonData.provisioners; 55 | template.Postprocessors = jsonData.postprocessors; 56 | return template; 57 | } 58 | 59 | public void SaveTo(string file) 60 | { 61 | JObject template = new JObject(); 62 | if (Variables != null) template.Add("variables", Variables); 63 | if (Builders != null) template.Add("builders", Builders); 64 | if (Provisioners != null) template.Add("provisioners", Provisioners); 65 | if (Postprocessors != null) template.Add("post-processors", Postprocessors); 66 | 67 | var json = JsonConvert.SerializeObject(template, 68 | Formatting.Indented, 69 | new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore }); 70 | 71 | File.WriteAllText(file, json); 72 | } 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /tools/packermerge/PackerMerge/PackerTemplateCombinator.cs: -------------------------------------------------------------------------------- 1 | // -------------------------------------------------------------- 2 | // 3 | // dev.microsoftedge.com -VMs 4 | // Copyright(c) Microsoft Corporation. All rights reserved. 5 | // 6 | // MIT License 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining 9 | // a copy of this software and associated documentation files(the ""Software""), 10 | // to deal in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies 12 | // of the Software, and to permit persons to whom the Software is furnished to do so, 13 | // subject to the following conditions : 14 | // 15 | // The above copyright notice and this permission notice shall be included 16 | // in all copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 19 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 20 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS 21 | // OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 23 | // OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | // 25 | // -------------------------------------------------------------- 26 | 27 | using System; 28 | using System.Collections.Generic; 29 | using System.Linq; 30 | using System.Threading.Tasks; 31 | 32 | namespace PackerMerge 33 | { 34 | public class PackerTemplateCombinator 35 | { 36 | private readonly PackerTemplate[] _input; 37 | private readonly PackerTemplate _output; 38 | 39 | public PackerTemplate Output 40 | { 41 | get 42 | { 43 | return _output; 44 | } 45 | } 46 | public PackerTemplateCombinator(IEnumerable<PackerTemplate> input) 47 | { 48 | _input = input.ToArray(); 49 | _output = new PackerTemplate(); 50 | } 51 | 52 | public PackerTemplateCombinator Combine() 53 | { 54 | foreach (var template in _input) 55 | { 56 | CombinatorStrategyAdd.Combine(_output, template); 57 | } 58 | return this; 59 | } 60 | 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /tools/packermerge/PackerMerge/Parameters.cs: -------------------------------------------------------------------------------- 1 | // -------------------------------------------------------------- 2 | // 3 | // dev.microsoftedge.com -VMs 4 | // Copyright(c) Microsoft Corporation. All rights reserved. 5 | // 6 | // MIT License 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining 9 | // a copy of this software and associated documentation files(the ""Software""), 10 | // to deal in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies 12 | // of the Software, and to permit persons to whom the Software is furnished to do so, 13 | // subject to the following conditions : 14 | // 15 | // The above copyright notice and this permission notice shall be included 16 | // in all copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 19 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 20 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS 21 | // OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 23 | // OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | // 25 | // -------------------------------------------------------------- 26 | 27 | using System; 28 | using System.Collections.Generic; 29 | using System.Linq; 30 | using System.Threading.Tasks; 31 | 32 | namespace PackerMerge 33 | { 34 | public class Parameters 35 | { 36 | private const string AddInputFlag = "-i:"; 37 | private const string SetOutputFlag = "-o:"; 38 | 39 | private readonly List<string> _inputFiles; 40 | public string OutputFile { get; private set; } 41 | 42 | public IEnumerable<string> InputFiles 43 | { 44 | get 45 | { 46 | return _inputFiles; 47 | } 48 | } 49 | 50 | public Parameters() 51 | { 52 | _inputFiles = new List<string>(); 53 | OutputFile = "template.json"; 54 | } 55 | 56 | public void Process( IEnumerable<string> args) 57 | { 58 | foreach (var arg in args) 59 | { 60 | if (!string.IsNullOrEmpty(arg)) 61 | { 62 | if (arg.StartsWith(AddInputFlag)) 63 | { 64 | ProcessAddInputFlag(arg.Substring(AddInputFlag.Length)); 65 | } 66 | else if (arg.StartsWith(SetOutputFlag)) 67 | { 68 | ProcessSetOutputFlag(arg.Substring(SetOutputFlag.Length)); 69 | } 70 | } 71 | } 72 | } 73 | 74 | private void ProcessAddInputFlag(string arg) 75 | { 76 | var input = arg.Split(','); 77 | foreach (var entry in input) 78 | { 79 | _inputFiles.Add(entry); 80 | } 81 | } 82 | 83 | private void ProcessSetOutputFlag(string arg) 84 | { 85 | OutputFile = arg; 86 | } 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /tools/packermerge/PackerMerge/Program.cs: -------------------------------------------------------------------------------- 1 | // -------------------------------------------------------------- 2 | // 3 | // dev.microsoftedge.com -VMs 4 | // Copyright(c) Microsoft Corporation. All rights reserved. 5 | // 6 | // MIT License 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining 9 | // a copy of this software and associated documentation files(the ""Software""), 10 | // to deal in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies 12 | // of the Software, and to permit persons to whom the Software is furnished to do so, 13 | // subject to the following conditions : 14 | // 15 | // The above copyright notice and this permission notice shall be included 16 | // in all copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 19 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 20 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS 21 | // OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 23 | // OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | // 25 | // -------------------------------------------------------------- 26 | 27 | using System; 28 | using System.Collections.Generic; 29 | using System.Linq; 30 | using System.Threading.Tasks; 31 | 32 | namespace PackerMerge 33 | { 34 | public class Program 35 | { 36 | static void Main(string[] args) 37 | { 38 | var parameters = new Parameters(); 39 | parameters.Process(args); 40 | 41 | var input = parameters.InputFiles.Select(i => PackerTemplate.ReadFrom(i)); 42 | var combinator = new PackerTemplateCombinator(input); 43 | combinator.Combine(); 44 | var result = combinator.Output; 45 | 46 | result.SaveTo(parameters.OutputFile); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /tools/packermerge/PackerMerge/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("PackerMerge")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("PackerMerge")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("ddde4d9b-8b6e-48e2-911b-ba715f253014")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /tools/packermerge/PackerMerge/packages.config: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="utf-8"?> 2 | <packages> 3 | <package id="Newtonsoft.Json" version="7.0.1" targetFramework="net452" /> 4 | </packages> -------------------------------------------------------------------------------- /tools/packermerge/PackerMerge/template.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /vms/release_notes_license_terms_8_1_15.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftEdge/dev.microsoftedge.com-vms/f61e112dc7bbb1ab8fce0e8a852237e090141a36/vms/release_notes_license_terms_8_1_15.docx -------------------------------------------------------------------------------- /vms/release_notes_license_terms_8_1_15.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftEdge/dev.microsoftedge.com-vms/f61e112dc7bbb1ab8fce0e8a852237e090141a36/vms/release_notes_license_terms_8_1_15.pdf --------------------------------------------------------------------------------