Version 1.1

This commit is contained in:
Olai Vike Bøe 2022-10-09 04:49:32 +02:00
parent 36efa34b4b
commit 2f1c46a4a3
2 changed files with 59 additions and 8 deletions

View file

@ -6,6 +6,9 @@
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
[void] [System.Reflection.Assembly]::LoadWithPartialName("PresentationFramework") [void] [System.Reflection.Assembly]::LoadWithPartialName("PresentationFramework")
$version = "Version 1.1"
Clear-Host Clear-Host
$host.ui.RawUI.WindowTitle = "Fix Windows 11 Powershell" $host.ui.RawUI.WindowTitle = "Fix Windows 11 Powershell"
#powershell.exe -WindowStyle Hidden -file > $null #powershell.exe -WindowStyle Hidden -file > $null
@ -105,6 +108,7 @@ function ChangeTaskBarLocation(){
if ($checkBox.Checked) if ($checkBox.Checked)
{ {
Set-ItemProperty -path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\" -Name "TaskbarAl" -Value 0 Set-ItemProperty -path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\" -Name "TaskbarAl" -Value 0
} }
else else
{ {
@ -161,12 +165,12 @@ function Win10RC(){
if ($checkBox6.Checked) if ($checkBox6.Checked)
{ {
reg.exe add "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /f /ve reg.exe add "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /f /ve
kill -n explorer Stop-Process -n explorer
} }
else else
{ {
reg.exe delete "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}" /f reg.exe delete "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}" /f
kill -n explorer Stop-Process -n explorer
} }
} }
@ -184,13 +188,13 @@ function FileExt(){
if ($checkBox8.Checked) if ($checkBox8.Checked)
{ {
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\" -Name "HideFileExt" -Value 0 Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\" -Name "HideFileExt" -Value 0
kill -n explorer Stop-Process -n explorer
c:\windows\explorer.exe c:\windows\explorer.exe
} }
else else
{ {
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\" -Name "HideFileExt" -Value 1 Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\" -Name "HideFileExt" -Value 1
kill -n explorer Stop-Process -n explorer
c:\windows\explorer.exe c:\windows\explorer.exe
} }
} }
@ -214,6 +218,24 @@ function DEBLOAT(){
Start-Process https://christitus.com/debloat-windows-10-2020/ Start-Process https://christitus.com/debloat-windows-10-2020/
} }
function Unpinabove(){
if ($checkBox10.Checked)
{
$checkbox2.Checked = $true
$checkbox3.Checked = $true
$checkbox4.Checked = $true
$checkbox5.Checked = $true
}
else
{
$checkbox2.Checked = $false
$checkbox3.Checked = $false
$checkbox4.Checked = $false
$checkbox5.Checked = $false
}
}
#======================================================== #========================================================
# Change TaskBar Location to Left # Change TaskBar Location to Left
#======================================================== #========================================================
@ -366,6 +388,35 @@ if($value9.Hidden -eq 1)
$checkBox9.Checked = $true $checkBox9.Checked = $true
} }
#========================================================
# Unpin/pin all
#========================================================
$checkbox10 = new-object System.Windows.Forms.checkbox
$checkbox10.Location ='30,130'
$checkbox10.Size = '250,14'
$checkbox10.Text = "Unpin all above"
$checkbox10.Add_CheckStateChanged({Unpinabove})
$Tab1.Controls.Add($checkbox10)
if($value2.ShowTaskViewButton -eq 0)
{
if($value3.TaskbarMn -eq 0)
{
if($value4.TaskbarDa -eq 0)
{
if($value5.SearchboxTaskbarMode -eq 0)
{
$checkBox10.Checked = $true
}
}
}
}
else {
$checkBox10.Checked = $false
}
#======================================================== #========================================================
# Debloat Windows 11 # Debloat Windows 11
#======================================================== #========================================================
@ -398,7 +449,7 @@ $Tab2.Controls.Add($label)
$versionlabel = New-Object System.Windows.Forms.Label $versionlabel = New-Object System.Windows.Forms.Label
$versionlabel.Location ='430,500' $versionlabel.Location ='430,500'
$versionlabel.Name = 'Version' $versionlabel.Name = 'Version'
$versionlabel.Text = 'Version 1.0' $versionlabel.Text = $version
$versionlabel.Size = '420, 14' $versionlabel.Size = '420, 14'
$Tab1.Controls.Add($versionlabel) $Tab1.Controls.Add($versionlabel)
@ -409,7 +460,7 @@ $Tab1.Controls.Add($versionlabel)
$versionlabel2 = New-Object System.Windows.Forms.Label $versionlabel2 = New-Object System.Windows.Forms.Label
$versionlabel2.Location ='430,500' $versionlabel2.Location ='430,500'
$versionlabel2.Name = 'Version' $versionlabel2.Name = 'Version'
$versionlabel2.Text = 'Version 1.0' $versionlabel2.Text = $version
$versionlabel2.Size = '420, 14' $versionlabel2.Size = '420, 14'
$Tab2.Controls.Add($versionlabel2) $Tab2.Controls.Add($versionlabel2)
@ -420,7 +471,7 @@ $Tab2.Controls.Add($versionlabel2)
$versionlabel3 = New-Object System.Windows.Forms.Label $versionlabel3 = New-Object System.Windows.Forms.Label
$versionlabel3.Location ='430,500' $versionlabel3.Location ='430,500'
$versionlabel3.Name = 'Version' $versionlabel3.Name = 'Version'
$versionlabel3.Text = 'Version 1.0' $versionlabel3.Text = $version
$versionlabel3.Size = '420, 14' $versionlabel3.Size = '420, 14'
$Tab3.Controls.Add($versionlabel3) $Tab3.Controls.Add($versionlabel3)

View file

@ -22,4 +22,4 @@ or Download and run Fix Windows 11.ps1
Well if you are somewhat of a power-user, you probably hate the way Windows 11 tries to limit the users. Use this script to be more like a power-user Well if you are somewhat of a power-user, you probably hate the way Windows 11 tries to limit the users. Use this script to be more like a power-user
## **Current version** ## **Current version**
Version **1.0** is the current version of the script Version **1.1** is the current version of the script