-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSet-WindowsAccentColors.ps1
More file actions
66 lines (52 loc) · 2.2 KB
/
Set-WindowsAccentColors.ps1
File metadata and controls
66 lines (52 loc) · 2.2 KB
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
# Found on the internet:
$RegPath = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Accent"
#Accent Color Menu Key
$AccentColorMenuKey = @{
Key = 'AccentColorMenu';
Type = "DWORD";
Value = '0xff4e3f30'
}
If ($Null -eq (Get-ItemProperty -Path $RegPath -Name $AccentColorMenuKey.Key -ErrorAction SilentlyContinue)) {
New-ItemProperty -Path $RegPath -Name $AccentColorMenuKey.Key -Value $AccentColorMenuKey.Value -PropertyType $AccentColorMenuKey.Type -Force
}
Else {
Set-ItemProperty -Path $RegPath -Name $AccentColorMenuKey.Key -Value $AccentColorMenuKey.Value -Force
}
#Accent Palette Key
$AccentPaletteKey = @{
Key = 'AccentPalette';
Type = "BINARY";
Value = '51,6b,84,ff,43,59,6e,ff,3a,4c,5e,ff,30,3f,4e,ff,26,33,3f,ff,1d,26,2f,ff,0f,14,19,ff,88,17,98,00'
}
$hexified = $AccentPaletteKey.Value.Split(',') | ForEach-Object { "0x$_" }
If ($Null -eq (Get-ItemProperty -Path $RegPath -Name $AccentPaletteKey.Key -ErrorAction SilentlyContinue)) {
New-ItemProperty -Path $RegPath -Name $AccentPaletteKey.Key -PropertyType Binary -Value ([byte[]]$hexified)
}
Else {
Set-ItemProperty -Path $RegPath -Name $AccentPaletteKey.Key -Value ([byte[]]$hexified) -Force
}
#MotionAccentId_v1.00 Key
$MotionAccentIdKey = @{
Key = 'MotionAccentId_v1.00';
Type = "DWORD";
Value = '0x000000db'
}
If ($Null -eq (Get-ItemProperty -Path $RegPath -Name $MotionAccentIdKey.Key -ErrorAction SilentlyContinue)) {
New-ItemProperty -Path $RegPath -Name $MotionAccentIdKey.Key -Value $MotionAccentIdKey.Value -PropertyType $MotionAccentIdKey.Type -Force
}
Else {
Set-ItemProperty -Path $RegPath -Name $MotionAccentIdKey.Key -Value $MotionAccentIdKey.Value -Force
}
#Start Color Menu Key
$StartMenuKey = @{
Key = 'StartColorMenu';
Type = "DWORD";
Value = '0xff3f3326'
}
If ($Null -eq (Get-ItemProperty -Path $RegPath -Name $StartMenuKey.Key -ErrorAction SilentlyContinue)) {
New-ItemProperty -Path $RegPath -Name $StartMenuKey.Key -Value $StartMenuKey.Value -PropertyType $StartMenuKey.Type -Force
}
Else {
Set-ItemProperty -Path $RegPath -Name $StartMenuKey.Key -Value $StartMenuKey.Value -Force
}
Stop-Process -ProcessName explorer -Force -ErrorAction SilentlyContinue