├── .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
77 |
78 |
79 |
80 |
81 | UABhAHMAcwB3ADAAcgBkACEAUABhAHMAcwB3AG8AcgBkAA==
82 | false
83 |
84 | IEUser
85 | IEUser
86 | administrators
87 | IEUser
88 |
89 |
90 |
91 |
92 | true
93 | true
94 | Home
95 | 1
96 |
97 |
98 |
99 | UABhAHMAcwB3ADAAcgBkACEAUABhAHMAcwB3AG8AcgBkAA==
100 | false
101 |
102 | IEUser
103 | true
104 |
105 |
106 |
107 | cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"
108 | Set Execution Policy 64 Bit
109 | 1
110 | true
111 |
112 |
113 | C:\Windows\SysWOW64\cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"
114 | Set Execution Policy 32 Bit
115 | 2
116 | true
117 |
118 |
119 | %SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v HideFileExt /t REG_DWORD /d 0 /f
120 | 3
121 | Show file extensions in Explorer
122 |
123 |
124 | %SystemRoot%\System32\reg.exe ADD HKCU\Console /v QuickEdit /t REG_DWORD /d 1 /f
125 | 4
126 | Enable QuickEdit mode
127 |
128 |
129 | %SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v Start_ShowRun /t REG_DWORD /d 1 /f
130 | 5
131 | Show Run command in Start Menu
132 |
133 |
134 | %SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v StartMenuAdminTools /t REG_DWORD /d 1 /f
135 | 6
136 | Show Administrative Tools in Start Menu
137 |
138 |
139 | %SystemRoot%\System32\reg.exe ADD HKLM\SYSTEM\CurrentControlSet\Control\Power\ /v HibernateFileSizePercent /t REG_DWORD /d 0 /f
140 | 7
141 | Zero Hibernation File
142 |
143 |
144 | %SystemRoot%\System32\reg.exe ADD HKLM\SYSTEM\CurrentControlSet\Control\Power\ /v HibernateEnabled /t REG_DWORD /d 0 /f
145 | 8
146 | Disable Hibernation Mode
147 |
148 |
149 | cmd.exe /c wmic useraccount where "name='IEUser'" set PasswordExpires=FALSE
150 | 9
151 | Disable password expiration for IEUser user
152 |
153 |
154 | REG ADD "HKLM\System\CurrentControlSet\Control\Network\NewNetworkWindowOff"
155 | Disable set Network Location
156 | 12
157 | true
158 |
159 |
160 | REG ADD “HKLM\System\CurrentControlSet\Services\Netlogon\Parameters” /v DisablePasswordChange /t REG_DWORD /d 2 /f
161 | Disable computer password change
162 | 13
163 | true
164 |
165 |
166 | wscript a:\install.vbs
167 | Change background with System Information
168 | true
169 | 14
170 |
171 |
172 | cmd.exe /c a:\microsoft-updates.bat
173 | 98
174 | Enable Microsoft Updates
175 |
176 |
177 | cmd.exe /c a:\preprovisioner.cmd
178 | Install IEBlocker, Windows Updates
179 | 100
180 | true
181 |
182 |
183 | false
184 |
185 |
186 |
187 |
188 |
189 | false
190 |
191 |
192 | IEWIN7
193 | Pacific Standard Time
194 |
195 |
196 |
197 | true
198 |
199 |
200 |
201 |
--------------------------------------------------------------------------------
/scripts/answer_files/81/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 8.1 Enterprise Evaluation
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
77 |
78 |
79 |
80 |
81 | UABhAHMAcwB3ADAAcgBkACEAUABhAHMAcwB3AG8AcgBkAA==
82 | false
83 |
84 | IEUser
85 | IEUser
86 | administrators
87 | IEUser
88 |
89 |
90 |
91 |
92 | true
93 | true
94 | Home
95 | 1
96 |
97 |
98 |
99 | UABhAHMAcwB3ADAAcgBkACEAUABhAHMAcwB3AG8AcgBkAA==
100 | false
101 |
102 | IEUser
103 | true
104 |
105 |
106 |
107 | cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"
108 | Set Execution Policy 64 Bit
109 | 1
110 | true
111 |
112 |
113 | C:\Windows\SysWOW64\cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"
114 | Set Execution Policy 32 Bit
115 | 2
116 | true
117 |
118 |
119 | %SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v HideFileExt /t REG_DWORD /d 0 /f
120 | 3
121 | Show file extensions in Explorer
122 |
123 |
124 | %SystemRoot%\System32\reg.exe ADD HKCU\Console /v QuickEdit /t REG_DWORD /d 1 /f
125 | 4
126 | Enable QuickEdit mode
127 |
128 |
129 | %SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v Start_ShowRun /t REG_DWORD /d 1 /f
130 | 5
131 | Show Run command in Start Menu
132 |
133 |
134 | %SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v StartMenuAdminTools /t REG_DWORD /d 1 /f
135 | 6
136 | Show Administrative Tools in Start Menu
137 |
138 |
139 | %SystemRoot%\System32\reg.exe ADD HKLM\SYSTEM\CurrentControlSet\Control\Power\ /v HibernateFileSizePercent /t REG_DWORD /d 0 /f
140 | 7
141 | Zero Hibernation File
142 |
143 |
144 | %SystemRoot%\System32\reg.exe ADD HKLM\SYSTEM\CurrentControlSet\Control\Power\ /v HibernateEnabled /t REG_DWORD /d 0 /f
145 | 8
146 | Disable Hibernation Mode
147 |
148 |
149 | cmd.exe /c wmic useraccount where "name='IEUser'" set PasswordExpires=FALSE
150 | 9
151 | Disable password expiration for IEUser user
152 |
153 |
154 | REG ADD "HKLM\System\CurrentControlSet\Control\Network\NewNetworkWindowOff"
155 | Disable set Network Location
156 | 12
157 | true
158 |
159 |
160 | REG ADD “HKLM\System\CurrentControlSet\Services\Netlogon\Parameters” /v DisablePasswordChange /t REG_DWORD /d 2 /f
161 | Disable computer password change
162 | 13
163 | true
164 |
165 |
166 | wscript a:\install.vbs
167 | Change background with System Information
168 | true
169 | 14
170 |
171 |
172 | cmd.exe /c a:\microsoft-updates.bat
173 | 98
174 | Enable Microsoft Updates
175 |
176 |
177 | cmd.exe /c a:\preprovisioner.cmd
178 | Install IEBlocker, Windows Updates
179 | 100
180 | true
181 |
182 |
183 | false
184 |
185 |
186 |
187 |
188 |
189 | false
190 |
191 |
192 | IE11WIN8_1
193 | Pacific Standard Time
194 |
195 |
196 |
197 | true
198 |
199 |
200 |
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')" vmgen generation process completed at ${finishTime}
2 |
3 | Summary
4 |
5 | OS Host | OS Guest | VM | Browser | Result |
6 | ${list}
7 |
--------------------------------------------------------------------------------
/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 |
2 |
3 |
4 | 2.0
5 |
6 |
7 | false
8 |
9 |
10 |
11 |
12 |
13 | 2239-4341-1642-9350-9545-7276-81
14 |
15 | {50069CC6-2266-443E-9BD6-A777426C3755}
16 | 2239-4341-1642-9350-9545-7276-81
17 |
18 | 9791-1806-1911-9702-3921-0693-28
19 | 2239-4341-1642-9350-9545-7276-81
20 |
21 | 00004000F020378002FFFF2F00FF3F1000003F00000000000031004C07070707065CFFFF208580FF03000000200C01800CFC00000000000000000000000000901A32E252580050E999E62401002784004A2080240000000000085AACFE1032547698BAE400000000000003000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
22 | 19005500080006291114
23 |
24 |
25 | 1024
26 |
27 |
28 |
29 | 1
30 |
31 | 0003FF2FE6C0
32 | 0
33 |
34 | FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
35 | Unplugged
36 |
37 |
38 |
39 |
40 | 16
41 |
42 |
43 |
44 |
45 | 1
46 |
47 | C:\{{name}}.vhd
48 | .\{{name}}.vhd
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | 2
59 |
60 | D
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 | Virtual PC 7
69 | 0001.0000.0000
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 | 0
79 |
80 |
81 | false
82 |
83 |
84 |
85 |
86 |
87 |
88 | false
89 | false
90 |
91 |
92 | 12
93 | 10
94 | 10
95 |
96 |
97 |
98 | true
99 | 15
100 | 10
101 |
102 |
103 | true
104 |
105 |
106 |
107 | 6.01.7601
108 | {{name}}
109 | {{name}}
110 | {{computer_name}}
111 |
112 | 14.1.7600.16403
113 |
114 |
115 |
116 |
117 |
118 | 6.1.7601.17514
119 | Virtual PC
120 |
121 |
122 | 6.1.7601.17514
123 | Virtual PC
124 |
125 |
126 |
127 |
128 | 1
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 | true
139 |
140 |
141 | {BCF59489-0E15-497E-AD41-83359EEB1146}
142 |
143 |
144 |
145 | 1
146 |
147 |
148 |
149 |
150 |
151 |
152 | 0
153 |
154 |
155 |
156 |
157 | true
158 |
159 |
160 |
161 | false
162 | 1
163 | false
164 | false
165 | true
166 |
167 |
171 | 8
172 |
173 |
174 | false
175 | false
176 |
177 | true
178 |
179 | true
180 | 181
181 | 46
182 | false
183 | 864
184 | 1152
185 |
186 |
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> _selectedOptions;
12 |
13 | public ConfigGenerator(Dictionary> 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> CreateDictionaryWithAllTheOptionsSelected(Dictionary> parameters)
59 | {
60 | var result = new Dictionary>();
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> AcceptedParameters = new Dictionary>
11 | {
12 | { Levels.OS, new List (Enum.GetNames(typeof(OSs)))},
13 | { Levels.VM, new List (Enum.GetNames(typeof(VMs)))},
14 | { Levels.Browser, new List (Enum.GetNames(typeof(Browsers)))},
15 | { Levels.WinVersion, new List (Enum.GetNames(typeof(WinVersions)))}
16 | };
17 |
18 | public static (bool success, Dictionary> output, List errors) TryToConvertToParameters(string[] parameters)
19 | {
20 | var wrongParameters = new List();
21 | var output = new Dictionary>();
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());
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 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 |
2 |
3 |
4 | exe
5 | netcoreapp1.1
6 |
7 | exe
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/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 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/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 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 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(origin);
73 | var generated = System.IO.File.ReadAllText(generatedPath);
74 | var jsonGenerated = JsonConvert.DeserializeObject(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 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {DFF9B4D9-7379-433A-A6A4-8255E03AD726}
8 | Exe
9 | Properties
10 | VMSGen
11 | VMSGen
12 | v4.6
13 | 512
14 | true
15 |
16 |
17 | AnyCPU
18 | true
19 | full
20 | false
21 | bin\Debug\
22 | DEBUG;TRACE
23 | prompt
24 | 4
25 |
26 |
27 | AnyCPU
28 | pdbonly
29 | true
30 | bin\Release\
31 | TRACE
32 | prompt
33 | 4
34 |
35 |
36 |
37 | ..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll
38 | True
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 | PreserveNewest
63 |
64 |
65 |
66 |
67 |
68 | xcopy /i "$(TargetDir)*.*" "$(TargetDir)..\..\..\..\..\bin\VMSGen" /y
69 |
70 |
77 |
--------------------------------------------------------------------------------
/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();
62 | var osList = new List();
63 |
64 | foreach (var osName in _vms)
65 | {
66 | var softwareList = new List();
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 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 softwareList, dynamic softwareName)
119 | {
120 | var software = new Software { SoftwareName = softwareName.Name };
121 | var browserList = new List();
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();
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 GetFileList(string buildId, Software software, string browserVersion, Browser browser, string absolutePath, string fileFilter)
174 | {
175 | if (!Directory.Exists(absolutePath)) return new List();
176 |
177 | var files = Directory.GetFiles(absolutePath, fileFilter);
178 |
179 | var fileList = new List();
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 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/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 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/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())
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 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {DDDE4D9B-8B6E-48E2-911B-BA715F253014}
8 | Exe
9 | Properties
10 | PackerMerge
11 | PackerMerge
12 | v4.6
13 | 512
14 | true
15 |
16 |
17 | AnyCPU
18 | true
19 | full
20 | false
21 | bin\Debug\
22 | DEBUG;TRACE
23 | prompt
24 | 4
25 |
26 |
27 | AnyCPU
28 | pdbonly
29 | true
30 | bin\Release\
31 | TRACE
32 | prompt
33 | 4
34 | false
35 |
36 |
37 |
38 | ..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll
39 | True
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 | xcopy /i "$(TargetDir)*.*" "$(TargetDir)..\..\..\..\..\bin\PackerMerge" /y
69 |
70 |
77 |
--------------------------------------------------------------------------------
/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 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 _inputFiles;
40 | public string OutputFile { get; private set; }
41 |
42 | public IEnumerable InputFiles
43 | {
44 | get
45 | {
46 | return _inputFiles;
47 | }
48 | }
49 |
50 | public Parameters()
51 | {
52 | _inputFiles = new List();
53 | OutputFile = "template.json";
54 | }
55 |
56 | public void Process( IEnumerable 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 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/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
--------------------------------------------------------------------------------