-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsetup.ps1
154 lines (129 loc) · 3.08 KB
/
setup.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
##########
# Win10 setup script
# Author: Ceynri <[email protected]>
# Version: v1.0, 2021-06-06
# Source: https://github.com/ceynri/win10-setup
##########
##########
# App list
##########
$msftBloats = @(
"Microsoft.Wallet",
"Microsoft.Messaging",
"Microsoft.YourPhone",
"Microsoft.People",
"Microsoft.GetHelp",
"Microsoft.Getstarted",
"Microsoft.SkypeApp",
"Microsoft.BingNews",
"Microsoft.BingMaps",
"Microsoft.BingSports",
"Microsoft.ZuneMusic",
"Microsoft.ZuneVideo",
"Microsoft.MicrosoftStickyNotes",
"Microsoft.Print3D",
"Microsoft.3DBuilder",
"Microsoft.Microsoft3DViewer",
"Microsoft.OneConnect",
"Microsoft.WindowsMaps",
"Microsoft.Windows.Cortana",
"Microsoft.MixedReality.Portal",
"Microsoft.MicrosoftSolitaireCollection",
"Microsoft.WindowsFeedbackHub",
"Microsoft.MicrosoftOfficeHub",
"Microsoft.Office.OneNote"
"microsoft.windowscommunicationsapps",
"Microsoft.Advertising.Xaml"
)
$wingetApps = @(
"Qv2ray.Qv2ray",
# "7zip.7zip",
# "nomacs.nomacs",
"Bandisoft.Bandizip -v 6.29", # the old version without ads
"Bandisoft.Honeyview",
"Microsoft.VisualStudioCode",
"Microsoft.Edge",
"Tencent.QQ",
"Tencent.WeChat",
"utools.utools",
"Git.Git",
"OpenJS.NodeJSLTS",
"Lexikos.AutoHotkey",
"agalwood.Motrix",
"Netease.CloudMusic",
"VideoLAN.VLC", # seems that the download is slow, and easy to report errors?
# "OBSProject.OBSStudio",
# "c0re100.qBittorrent-Enhanced-Edition",
"SyncTrayzor.SyncTrayzor",
"NickeManarin.ScreenToGif",
"Microsoft.WindowsTerminal",
"Google.Chrome",
"Logitech.Options",
"Anaconda.Miniconda3"
)
$chocoApps = @(
"v2ray",
"traffic-monitor",
"nvm.portable"
# "aria2"
# "ffmpeg",
# "freefilesync",
# "setpoint",
)
$npmPackages = @(
"whistle"
)
$gitRepos = @(
"awesome-ahk"
)
# add -url can download by wget
# Do not add extra spaces to separate app name
$notInstalledApps = @(
"Snipaste.zip -url https://dl.snipaste.com/win-x64-beta-cn",
"WGestures.zip -url https://www.yingdev.com/Content/Projects/WGestures/Release/1.8.4.0/Install%20WGestures%201.8.4.0.zip",
"Office365",
"OfficeToolPlus",
"PhotoShop",
"Premiere",
"WSL",
"BaiduNetDisk: https://pan.baidu.com/download"
)
##########
# Command list
##########
# import .psm1 module
Import-Module -Name "./setup.psm1" -ErrorAction Stop
# system settings
RequireAdmin
CreateTmpDir
ActivateWin10
RenameComputerName
setPowerSettings
executeTweaks("Tweaks")
# application management
UninstallMsftBloat($msftBloats)
# install by winget
ProxyWarning
InstallWinget
InstallAppByWinget($wingetApps)
RefreshEnv
# install by choco
ChocoProxyWarning
InstallChoco
InstallAppByChoco($chocoApps)
RefreshEnv
# others
ManualInstallApp($notInstalledApps)
WaitForKey
# environment settings
SetGitNameAndEmail
EnableGitProxy(10809)
EnableNpmRegistry
# InstallWindowsBuildTools
# others download
InstallNpmPackage($npmPackages)
CreateWorkspaceDir
CloneGitRepos($gitRepos)
# end
RemoveTmpCheck
RestartTips