4
4
5
5
Disable-UAC
6
6
7
+ # --- Windows Subsystems/Features ---
8
+ # choco install -y Microsoft-Windows-Subsystem-Linux -source windowsfeatures
9
+ # choco install -y Microsoft-Hyper-V-All -source windowsFeatures
10
+ # choco install -y sysinternals
11
+ # choco install -y docker-for-windows
12
+
13
+ # --- Configuring Windows properties ---
7
14
# --- Windows Features ---
8
15
Set-WindowsExplorerOptions - EnableShowHiddenFilesFoldersDrives - EnableShowProtectedOSFiles - EnableShowFileExtensions
9
16
@@ -13,17 +20,53 @@ Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\
13
20
Set-ItemProperty - Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced - Name LaunchTo - Value 1
14
21
Set-ItemProperty - Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced - Name MMTaskbarMode - Value 2
15
22
16
- # --- Windows Subsystems/Features ---
17
- choco install - y Microsoft- Hyper- V- All - source windowsFeatures
18
- choco install - y Microsoft- Windows- Subsystem- Linux - source windowsfeatures
23
+ # --- Enabling developer mode on the system ---
24
+ Set-ItemProperty - Path HKLM:\Software\Microsoft\Windows\CurrentVersion\AppModelUnlock - Name AllowDevelopmentWithoutDevLicense - Value 1
25
+
26
+ # --- VS 2017 uwp and azure workloads + git tools ---
27
+ # See this for install args: https://chocolatey.org/packages/VisualStudio2017Community
28
+ # https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-community
29
+ # https://docs.microsoft.com/en-us/visualstudio/install/use-command-line-parameters-to-install-visual-studio#list-of-workload-ids-and-component-ids
30
+ choco install visualstudio2017community -- package- parameters " --add Microsoft.VisualStudio.Workload.Azure --add Microsoft.VisualStudio.Component.Git"
31
+ RefreshEnv
32
+
33
+ choco install visualstudio2017- workload- universal
34
+
35
+ # --- grabbing latest UWP Samples off Github ---
36
+ RefreshEnv
37
+ cd $env: USERPROFILE \desktop
38
+ mkdir UwpSamples
39
+ cd UwpSamples
40
+ git clone https:// github.com / Microsoft/ Windows- universal- samples/
41
+
42
+ # installing Windows Template Studio VSIX
43
+ # choco was claiming dev 15 can't do this anymore for vsix... odd hasn't been fixed yet
44
+ # Install-ChocolateyVsixPackage -PackageName "Windows Template Studio" -VsixUrl $wtsFileUrl.source
45
+
46
+ $requestUri = ' https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery'
47
+ $requestBody = ' {"flags":"262","filters":[{"criteria":[{"filterType":"10","value":"windows template studio"}],"sortBy":"0","sortOrder":"2","pageSize":"25","pageNumber":"1"}]}'
48
+ $requestHeaders = New-Object " System.Collections.Generic.Dictionary[[String],[String]]"
49
+ $requestHeaders.Add (' Accept' , ' application/json; api-version=3.2-preview.1' )
50
+ $requestHeaders.Add (' Content-Type' , ' application/json; charset=utf-8' )
51
+
52
+ $results = Invoke-WebRequest - Uri $requestUri - Method POST - Headers $requestHeaders - Body $requestBody - UseBasicParsing
53
+
54
+ $jsonResults = $results.Content | ConvertFrom-Json
55
+ $wtsResults = $jsonResults.results [0 ].extensions | where {$_.extensionName -eq " WindowsTemplateStudio" }
56
+ $wtsFileUrl = $wtsResults.versions [0 ].files | where {$_.assetType -eq " Microsoft.Templates.2017.vsix" }
57
+
58
+ $wtsVsix = [System.IO.Path ]::GetFileName($wtsFileUrl.source )
59
+ $wtsFullPath = [System.IO.Path ]::Combine((Resolve-Path .\).Path, $wtsVsix );
60
+ Invoke-WebRequest - Uri $wtsFileUrl.source - OutFile $wtsVsix
61
+ $vsixInstallerFile = Get-Childitem - Include vsixinstaller.exe - Recurse - Path " C:\Program Files (x86)\Microsoft Visual Studio\2017\"
62
+ $wtsArgList = $wtsFullPath + " /q"
63
+
64
+ $vsixInstallerResult = Start-Process - FilePath $vsixInstallerFile.FullName - ArgumentList $wtsArgList - Wait - PassThru;
19
65
20
- # --- Tools ---
21
- choco install - y visualstudio2017community # See this for install args: https://chocolatey.org/packages/VisualStudio2017Community
22
- choco install - y sysinternals
23
- # choco install -y docker-for-windows
66
+ Remove-Item $wtsVsix
24
67
25
- # TODO: should pass install args to VS2017 to install additional options
26
68
69
+ # --- reenabling critial items ---
27
70
Enable-UAC
28
71
Enable-MicrosoftUpdate
29
- Install-WindowsUpdate - acceptEula
72
+ Install-WindowsUpdate - acceptEula
0 commit comments