|
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 --- |
14 |
| -#--- Windows Features --- |
15 |
| -Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions |
16 |
| - |
17 |
| -#--- File Explorer Settings --- |
18 |
| -Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name NavPaneExpandToCurrentFolder -Value 1 |
19 |
| -Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name NavPaneShowAllFolders -Value 1 |
20 |
| -Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name LaunchTo -Value 1 |
21 |
| -Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name MMTaskbarMode -Value 2 |
22 |
| - |
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 --- |
| 7 | +# see if we can't get calling URL somehow, that would eliminate this need |
| 8 | +# should move to a config file |
| 9 | +$user = "Microsoft"; |
| 10 | +$baseBranch = "BreakUpScripts"; |
| 11 | +$finalBaseHelperUri = "https://raw.githubusercontent.com/$user/windows-dev-box-setup-scripts/$baseBranch/scripts"; |
| 12 | + |
| 13 | +function executeScript { |
| 14 | + Param ([string]$script) |
| 15 | + write-host "executing $finalBaseHelperUri/$script ..." |
| 16 | + iex ((new-object net.webclient).DownloadString("$finalBaseHelperUri/$script")) |
| 17 | +} |
| 18 | + |
| 19 | +#--- Setting up Windows --- |
| 20 | +executeScript "SystemConfiguration.ps1"; |
| 21 | +executeScript "FileExplorerSettings.ps1"; |
| 22 | +executeScript "RemoveDefaultApps.ps1"; |
| 23 | +executeScript "CommonDevTools.ps1"; |
| 24 | + |
| 25 | +#--- Tools --- |
| 26 | +#--- Installing VS and VS Code with Git |
27 | 27 | # See this for install args: https://chocolatey.org/packages/VisualStudio2017Community
|
28 | 28 | # https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-community
|
29 | 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; |
65 |
| - |
66 |
| -Remove-Item $wtsVsix |
67 |
| - |
| 30 | +# visualstudio2017community |
| 31 | +# visualstudio2017professional |
| 32 | +# visualstudio2017enterprise |
| 33 | + |
| 34 | +choco install visualstudio2017community -y --package-parameters "--add Microsoft.VisualStudio.Component.Git" |
| 35 | +RefreshEnv #refreshing env due to Git install |
| 36 | + |
| 37 | +#--- UWP Workload and installing Windows Template Studio --- |
| 38 | +choco install -y visualstudio2017-workload-azure |
| 39 | +choco install -y visualstudio2017-workload-universal |
| 40 | +executeScript "WindowsTemplateStudio.ps1"; |
| 41 | +executeScript "GetUwpSamplesOffGithub.ps1"; |
68 | 42 |
|
69 | 43 | #--- reenabling critial items ---
|
70 | 44 | Enable-UAC
|
|
0 commit comments