Add-Type -AssemblyName PresentationFramework function OlaYZen { #Clear-Host write-host " " write-host "===========================================" write-host "===========================================" write-host " " write-host "YYYY YYYYZZZZZZZZZZZZZZZZZZZZZ " write-host " Y::Y Y::::::::::::::::::::::::Z " write-host " Y::Y Y::YYYZZZZZZZZZZZZZZZZZ:::Z " write-host " Y::Y Y::Y Z:::Z " write-host " Y:::Y Y:::Y Z:::Z " write-host " Y:::Y Y:::Y Z:::Z " write-host " Y:::Y:::Y Z:::Z " write-host " Y:::::Y Z:::Z " write-host " Y:::Y Z:::Z " write-host " Y:::Y Z:::Z " write-host " Y:::Y Z:::Z " write-host " Y:::Y Z:::Z " write-host " Y:::Y Z:::Z " write-host " Y:::Y Z:::ZZZZZZZZZZZZZZZZ " write-host " Y:::Y Z:::::::::::::::::::Z " write-host " YYYYY ZZZZZZZZZZZZZZZZZZZZZ " write-host " " write-host "===========================================" write-host "===========================================" write-host " " write-host " " write-host "============= made by OlaYZen =============" write-host " " } function Test-RegistryValue { param ( [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [string]$Path, [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [string]$Value ) try { $registryValue = Get-ItemProperty -Path $Path -ErrorAction Stop if ($registryValue.PSObject.Properties.Name -contains $Value) { return $true } else { return $false } } catch { return $false } } function PreWin10 { if (-Not (Test-RegistryValue -Path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People' -Value 'PeopleBand')) { Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People" -Name "PeopleBand" -Value 0 } if (-Not (Test-RegistryValue -Path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\PenWorkspace' -Value 'PenWorkspaceButtonDesiredVisibility')) { Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\PenWorkspace" -Name "PenWorkspaceButtonDesiredVisibility" -Value 0 } if (-Not (Test-RegistryValue -Path 'HKCU:\SOFTWARE\Microsoft\TabletTip\1.7' -Value 'TipbandDesiredVisibility')) { Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\TabletTip\1.7" -Name "TipbandDesiredVisibility" -Value 0 } } $windowsVersion = [System.Environment]::OSVersion.Version.Major if ($windowsVersion -eq 10) { PreWin10 } elseif ($windowsVersion -eq 11) { PreWin11 } function PreWin11 { # if (-Not (Test-RegistryValue -Path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People' -Value 'PeopleBand')) { # Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People" -Name "PeopleBand" -Value 0 # } # if (-Not (Test-RegistryValue -Path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\PenWorkspace' -Value 'PenWorkspaceButtonDesiredVisibility')) { # Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\PenWorkspace" -Name "PenWorkspaceButtonDesiredVisibility" -Value 0 # } # if (-Not (Test-RegistryValue -Path 'HKCU:\SOFTWARE\Microsoft\TabletTip\1.7' -Value 'TipbandDesiredVisibility')) { # Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\TabletTip\1.7" -Name "TipbandDesiredVisibility" -Value 0 # } write-host "=------------------------------=" write-host " Windows 11 is still in WIP " write-host "=------------------------------=" } $Branch = 'Newest' powershell.exe -WindowStyle Hidden -file > $null $inputXML = (new-object Net.WebClient).DownloadString("https://raw.githubusercontent.com/OlaYZen/Enhance-Windows/$Branch/MainWindow.xaml") #uncomment for Production $inputXML = $inputXML -replace 'mc:Ignorable="d"', '' -replace "x:N", 'N' -replace '^