Skip to content

Commit 65aad7d

Browse files
authored
Merge pull request #51 from crutkas/TestRemotePs
Test remote ps
2 parents 725c4da + 7d17edc commit 65aad7d

6 files changed

+154
-51
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@ Before you begin, please read the [Legal](#Legal) section.
1414

1515
To run a setup script, click a link in the table below from your target machine. This will download Boxstarter, and prompt you for Boxstarter to run with Administrator privileges (which it needs to do its job). Clicking yes in this dialog will cause the script to begin. You can then leave the job unattended and come back when it's finished.
1616

17+
** TESTING ON DIFFERENT BRANCH OTHER THAN MASTER **
1718
|Click link to run |Description |
1819
|---------|---------|
19-
|<a href='http://boxstarter.org/package/nr/url?https://raw.githubusercontent.com/Microsoft/windows-dev-box-setup-scripts/master/dev_app.ps1'>Desktop App</a> | Windows Desktop App Development (Visual Studio, Windows SDK) |
20-
|<a href='http://boxstarter.org/package/nr/url?https://raw.githubusercontent.com/Microsoft/windows-dev-box-setup-scripts/master/dev_web.ps1'>Web</a> | Web (VS Code, WSL, Multiple Browsers) |
21-
|<a href='http://boxstarter.org/package/nr/url?https://raw.githubusercontent.com/Microsoft/windows-dev-box-setup-scripts/master/dev_web_nodejs.ps1'>Web NodeJS</a> | Web Dev with NodeJS (Web + NodeJS LTS)¹ |
22-
|<a href='http://boxstarter.org/package/nr/url?https://raw.githubusercontent.com/Microsoft/windows-dev-box-setup-scripts/master/dev_ml_python.ps1'>Machine Learning</a>| Machine Learning (Python, WSL, VS Code) |
20+
|<a href='http://boxstarter.org/package/nr/url?https://raw.githubusercontent.com/Microsoft/windows-dev-box-setup-scripts/BreakUpScripts/dev_app.ps1'>Desktop App</a> | Windows Desktop App Development (Visual Studio, Windows SDK) |
21+
|<a href='http://boxstarter.org/package/nr/url?https://raw.githubusercontent.com/Microsoft/windows-dev-box-setup-scripts/BreakUpScripts/dev_web.ps1'>Web</a> | Web (VS Code, WSL, Multiple Browsers) |
22+
|<a href='http://boxstarter.org/package/nr/url?https://raw.githubusercontent.com/Microsoft/windows-dev-box-setup-scripts/BreakUpScripts/dev_web_nodejs.ps1'>Web NodeJS</a> | Web Dev with NodeJS (Web + NodeJS LTS)¹ |
23+
|<a href='http://boxstarter.org/package/nr/url?https://raw.githubusercontent.com/Microsoft/windows-dev-box-setup-scripts/BreakUpScripts/dev_ml_python.ps1'>Machine Learning</a>| Machine Learning (Python, WSL, VS Code) |
2324
| | Xamarin (Visual Studio, Xamarin, Android SDK) |
2425
| | Containers (Docker, Kubernetes, etc...) |
2526
| | More Coming Soon! |

dev_app.ps1

Lines changed: 18 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -10,63 +10,34 @@ Disable-UAC
1010
#choco install -y sysinternals
1111
#choco install -y docker-for-windows
1212

13-
#--- Configuring Windows properties ---
14-
#--- Windows Features ---
15-
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions
13+
# should move to a config file
14+
$user = "crutkas";
15+
$baseBranch = "master";
16+
$finalBaseHelperUri = "https://raw.githubusercontent.com/$user/windows-dev-box-setup-scripts/$baseBranch/scripts";
1617

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
18+
#Setting up Windows
19+
executeScript("FileExplorerSettings.ps1");
20+
executeScript("RemoveDefaultApps.ps1");
2521

22+
#--- Tools ---
2623
#--- VS 2017 uwp and azure workloads + git tools ---
2724
# See this for install args: https://chocolatey.org/packages/VisualStudio2017Community
2825
# https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-community
2926
# https://docs.microsoft.com/en-us/visualstudio/install/use-command-line-parameters-to-install-visual-studio#list-of-workload-ids-and-component-ids
3027
choco install visualstudio2017community --package-parameters "--add Microsoft.VisualStudio.Workload.Azure --add Microsoft.VisualStudio.Component.Git"
31-
RefreshEnv
28+
RefreshEnv #refreshing env due to Git install
3229

30+
#--- UWP Workload and installing Windows Template Studio
3331
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-
32+
executeScript("WindowsTemplateStudio.ps1");
33+
executeScript("GetUwpSamplesOffGithub.ps1");
6834

6935
#--- reenabling critial items ---
7036
Enable-UAC
7137
Enable-MicrosoftUpdate
72-
Install-WindowsUpdate -acceptEula
38+
Install-WindowsUpdate -acceptEula
39+
40+
function executeScript {
41+
Param ([string]$script)
42+
iex ((new-object net.webclient).DownloadString("$finalBaseHelperUri/$script"))
43+
}

scripts/FileExplorerSettings.ps1

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#--- Configuring Windows properties ---
2+
#--- Windows Features ---
3+
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions
4+
5+
#--- File Explorer Settings ---
6+
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name NavPaneExpandToCurrentFolder -Value 1
7+
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name NavPaneShowAllFolders -Value 1
8+
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name LaunchTo -Value 1
9+
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name MMTaskbarMode -Value 2
10+
11+
#--- Enabling developer mode on the system ---
12+
Set-ItemProperty -Path HKLM:\Software\Microsoft\Windows\CurrentVersion\AppModelUnlock -Name AllowDevelopmentWithoutDevLicense -Value 1

scripts/GetUwpSamplesOffGithub.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
RefreshEnv
2+
cd $env:USERPROFILE\desktop
3+
mkdir UwpSamples
4+
cd UwpSamples
5+
git clone https://github.com/Microsoft/Windows-universal-samples/

scripts/RemoveDefaultApps.ps1

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
#--- Uninstall unecessary applications that come with Windows out of the box ---
2+
3+
# 3D Builder
4+
Get-AppxPackage Microsoft.3DBuilder | Remove-AppxPackage
5+
6+
# Autodesk
7+
Get-AppxPackage *Autodesk* | Remove-AppxPackage
8+
9+
# Bing Weather, News, Sports, and Finance (Money):
10+
Get-AppxPackage Microsoft.BingFinance | Remove-AppxPackage
11+
Get-AppxPackage Microsoft.BingNews | Remove-AppxPackage
12+
Get-AppxPackage Microsoft.BingSports | Remove-AppxPackage
13+
Get-AppxPackage Microsoft.BingWeather | Remove-AppxPackage
14+
15+
# BubbleWitch
16+
Get-AppxPackage *BubbleWitch* | Remove-AppxPackage
17+
18+
# Candy Crush
19+
Get-AppxPackage king.com.CandyCrush* | Remove-AppxPackage
20+
21+
# Comms Phone
22+
Get-AppxPackage Microsoft.CommsPhone | Remove-AppxPackage
23+
24+
# Dell
25+
Get-AppxPackage *Dell* | Remove-AppxPackage
26+
27+
# Dropbox
28+
Get-AppxPackage *Dropbox* | Remove-AppxPackage
29+
30+
# Facebook
31+
Get-AppxPackage *Facebook* | Remove-AppxPackage
32+
33+
# Get Started
34+
Get-AppxPackage Microsoft.Getstarted | Remove-AppxPackage
35+
36+
# Keeper
37+
Get-AppxPackage *Keeper* | Remove-AppxPackage
38+
39+
# Maps
40+
Get-AppxPackage Microsoft.WindowsMaps | Remove-AppxPackage
41+
42+
# March of Empires
43+
Get-AppxPackage *MarchofEmpires* | Remove-AppxPackage
44+
45+
# Messaging
46+
Get-AppxPackage Microsoft.Messaging | Remove-AppxPackage
47+
48+
# Minecraft
49+
Get-AppxPackage *Minecraft* | Remove-AppxPackage
50+
51+
# Netflix
52+
Get-AppxPackage *Netflix* | Remove-AppxPackage
53+
54+
# Office Hub
55+
Get-AppxPackage Microsoft.MicrosoftOfficeHub | Remove-AppxPackage
56+
57+
# One Connect
58+
Get-AppxPackage Microsoft.OneConnect | Remove-AppxPackage
59+
60+
# Phone
61+
Get-AppxPackage Microsoft.WindowsPhone | Remove-AppxPackage
62+
63+
# Plex
64+
Get-AppxPackage *Plex* | Remove-AppxPackage
65+
66+
# Skype
67+
Get-AppxPackage Microsoft.SkypeApp | Remove-AppxPackage
68+
69+
# Sound Recorder
70+
Get-AppxPackage Microsoft.WindowsSoundRecorder | Remove-AppxPackage
71+
72+
# Solitaire
73+
Get-AppxPackage *Solitaire* | Remove-AppxPackage
74+
75+
# Sticky Notes
76+
Get-AppxPackage Microsoft.MicrosoftStickyNotes | Remove-AppxPackage
77+
78+
# Sway
79+
Get-AppxPackage Microsoft.Office.Sway | Remove-AppxPackage
80+
81+
# Twitter
82+
Get-AppxPackage *Twitter* | Remove-AppxPackage
83+
84+
# Xbox
85+
Get-AppxPackage Microsoft.XboxApp | Remove-AppxPackage
86+
Get-AppxPackage Microsoft.XboxIdentityProvider | Remove-AppxPackage
87+
88+
# Zune Music, Movies & TV
89+
Get-AppxPackage Microsoft.ZuneMusic | Remove-AppxPackage
90+
Get-AppxPackage Microsoft.ZuneVideo | Remove-AppxPackage

scripts/WindowsTemplateStudio.ps1

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# installing Windows Template Studio VSIX
2+
$requestUri = "https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery"
3+
$requestBody = '{"flags":"262","filters":[{"criteria":[{"filterType":"10","value":"windows template studio"}],"sortBy":"0","sortOrder":"2","pageSize":"25","pageNumber":"1"}]}'
4+
$requestHeaders = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
5+
$requestHeaders.Add('Accept','application/json; api-version=3.2-preview.1')
6+
$requestHeaders.Add('Content-Type','application/json; charset=utf-8')
7+
8+
$results = Invoke-WebRequest -Uri $requestUri -Method POST -Headers $requestHeaders -Body $requestBody -UseBasicParsing
9+
10+
$jsonResults = $results.Content | ConvertFrom-Json
11+
$wtsResults = $jsonResults.results[0].extensions | where {$_.extensionName -eq "WindowsTemplateStudio"}
12+
$wtsFileUrl = $wtsResults.versions[0].files | where {$_.assetType -eq "Microsoft.Templates.2017.vsix"}
13+
14+
$wtsVsix = [System.IO.Path]::GetFileName($wtsFileUrl.source)
15+
$wtsFullPath = [System.IO.Path]::Combine((Resolve-Path .\).Path, $wtsVsix);
16+
17+
Invoke-WebRequest -Uri $wtsFileUrl.source -OutFile $wtsVsix
18+
19+
$vsixInstallerFile = Get-Childitem -Include vsixinstaller.exe -Recurse -Path "C:\Program Files (x86)\Microsoft Visual Studio\2017\"
20+
$wtsArgList = $wtsFullPath + " /q"
21+
22+
$vsixInstallerResult = Start-Process -FilePath $vsixInstallerFile.FullName -ArgumentList $wtsArgList -Wait -PassThru;
23+
24+
Remove-Item $wtsVsix

0 commit comments

Comments
 (0)