-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDisable-TaskbarAutohide.ps1
More file actions
39 lines (31 loc) · 951 Bytes
/
Disable-TaskbarAutohide.ps1
File metadata and controls
39 lines (31 loc) · 951 Bytes
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
try{
. ..\Write-Log.ps1
} catch {}
$AutoHide = @{
Enabled = 3
Disabled = 2
}
$TaskbarPosition = @{
Top=1
Bottom=3
}
While ($true) {
$UserHives = Get-ChildItem Registry::HKU
foreach ($Hive in $UserHives) {
$Path = $Hive.Name+"\Software\Microsoft\Windows\CurrentVersion\Explorer\StuckRects2"
if (Test-Path Registry::$Path) {
$Existing = Get-ItemProperty -Path Registry::$Path -Name Settings
if ($Existing.Settings[8] -eq $AutoHide.Enabled) {
Write-Log ($Hive.Name)
$Existing.Settings[8] = $AutoHide.Disabled
Set-ItemProperty -Path Registry::$Path -Name Settings -Value ($Existing.Settings)
}
if ($Existing.Settings[12] -eq $TaskbarPosition.Top) {
Write-Log ($Hive.Name)
$Existing.Settings[12] = $TaskbarPosition.Bottom
Set-ItemProperty -Path Registry::$Path -Name Settings -Value ($Existing.Settings)
}
}
}
Start-Sleep -s 1
}