2022-11-04 13:53:51 +00:00
Add-Type -AssemblyName PresentationFramework
2022-10-09 01:43:29 +00:00
2022-11-04 13:53:51 +00:00
function OlaYZen {
#Clear-Host
2022-10-09 01:43:29 +00:00
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 " "
2022-11-04 13:53:51 +00:00
}
2022-10-09 01:43:29 +00:00
2023-11-02 08:08:26 +00:00
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
}
2022-10-09 01:43:29 +00:00
2023-11-02 08:08:26 +00:00
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
# }
2022-10-09 01:43:29 +00:00
2023-11-02 08:08:26 +00:00
write-host " =------------------------------= "
write-host " Windows 11 is still in WIP "
write-host " =------------------------------= "
}
2022-10-09 01:43:29 +00:00
2023-11-02 09:22:48 +00:00
$Branch = '1.1.8'
2022-10-11 06:54:57 +00:00
2022-11-04 13:53:51 +00:00
powershell . exe -WindowStyle Hidden -file > $null
2022-11-08 10:23:38 +00:00
$inputXML = ( new-object Net . WebClient ) . DownloadString ( " https://raw.githubusercontent.com/OlaYZen/Enhance-Windows/ $Branch /MainWindow.xaml " ) #uncomment for Production
2022-11-04 13:53:51 +00:00
$inputXML = $inputXML -replace 'mc:Ignorable="d"' , '' -replace " x:N " , 'N' -replace '^<Win.*' , '<Window'
[ void][System.Reflection.Assembly ] :: LoadWithPartialName ( 'presentationframework' )
[ xml ] $XAML = $inputXML
#Read XAML
$reader = ( New-Object System . Xml . XmlNodeReader $xaml )
try { $Form = [ Windows.Markup.XamlReader ] :: Load ( $reader ) }
catch [ System.Management.Automation.MethodInvocationException ] {
Write-Warning " We ran into a problem with the XAML code. Check the syntax for this control... "
write-host $error [ 0 ] . Exception . Message -ForegroundColor Red
If ( $error [ 0 ] . Exception . Message -like " *button* " ) {
write-warning " Ensure your <button in the `$ inputXML does NOT have a Click=ButtonClick property. PS can't handle this `n `n `n `n "
}
2022-10-09 01:43:29 +00:00
}
2022-11-04 13:53:51 +00:00
catch {
Write-Host " Unable to load Windows.Markup.XamlReader. Double-check syntax and ensure .net is installed. "
}
#===========================================================================
# Store Form Objects In PowerShell
#===========================================================================
$xaml . SelectNodes ( " //*[@Name] " ) | ForEach-Object { Set-Variable -Name " WPF $( $_ . Name ) " -Value $Form . FindName ( $_ . Name ) }
2022-10-09 01:43:29 +00:00
2022-10-11 06:54:57 +00:00
function RemSearchwin10 ( ) {
2022-11-04 13:53:51 +00:00
if ( $WPFUnpin_Search . IsChecked )
2022-10-11 06:54:57 +00:00
{
Set-ItemProperty -path " HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search\ " -Name " SearchboxTaskbarMode " -Value 0
Stop-Process -n explorer
c: \ windows \ explorer . exe
}
else
{
Set-ItemProperty -path " HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search\ " -Name " SearchboxTaskbarMode " -Value 2
Stop-Process -n explorer
c: \ windows \ explorer . exe
}
}
function RemTaskViewwin10 ( ) {
2022-11-04 13:53:51 +00:00
if ( $WPFUnpin_Task_View . IsChecked )
2022-10-11 06:54:57 +00:00
{
Set-ItemProperty -path " HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ " -Name " ShowTaskViewButton " -Value 0
Stop-Process -n explorer
c: \ windows \ explorer . exe
}
else
{
Set-ItemProperty -path " HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ " -Name " ShowTaskViewButton " -Value 1
Stop-Process -n explorer
c: \ windows \ explorer . exe
}
}
function RemCortana ( ) {
2022-11-04 13:53:51 +00:00
if ( $WPFUnpin_Cortana . IsChecked )
2022-10-11 06:54:57 +00:00
{
Set-ItemProperty -path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced " -Name " ShowCortanaButton " -Value 0
Stop-Process -n explorer
c: \ windows \ explorer . exe
}
else
{
Set-ItemProperty -path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced " -Name " ShowCortanaButton " -Value 1
Stop-Process -n explorer
c: \ windows \ explorer . exe
}
}
function RemPeople ( ) {
2022-11-04 13:53:51 +00:00
if ( $WPFUnpin_People . IsChecked )
2022-10-11 06:54:57 +00:00
{
Set-ItemProperty -path " HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People " -Name " PeopleBand " -Value 0
Stop-Process -n explorer
c: \ windows \ explorer . exe
}
else
{
Set-ItemProperty -path " HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People " -Name " PeopleBand " -Value 1
Stop-Process -n explorer
c: \ windows \ explorer . exe
}
}
function RemInkWS ( ) {
2022-11-04 13:53:51 +00:00
if ( $WPFUnpin_Ink_Workspace . IsChecked )
2022-10-11 06:54:57 +00:00
{
Set-ItemProperty -path " HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\PenWorkspace\ " -Name " PenWorkspaceButtonDesiredVisibility " -Value 0
Stop-Process -n explorer
c: \ windows \ explorer . exe
}
else
{
Set-ItemProperty -path " HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\PenWorkspace\ " -Name " PenWorkspaceButtonDesiredVisibility " -Value 1
Stop-Process -n explorer
c: \ windows \ explorer . exe
}
}
function RemTouchKey ( ) {
2022-11-04 13:53:51 +00:00
if ( $WPFUnpin_Touch_Keyboard . IsChecked )
2022-10-11 06:54:57 +00:00
{
Set-ItemProperty -path " HKCU:\SOFTWARE\Microsoft\TabletTip\1.7 " -Name " TipbandDesiredVisibility " -Value 0
Stop-Process -n explorer
c: \ windows \ explorer . exe
}
else
{
Set-ItemProperty -path " HKCU:\SOFTWARE\Microsoft\TabletTip\1.7 " -Name " TipbandDesiredVisibility " -Value 1
Stop-Process -n explorer
c: \ windows \ explorer . exe
}
}
2022-11-04 13:53:51 +00:00
function Unpinabovewin10 ( ) {
if ( $WPFUnpin_All_Above . IsChecked )
2022-10-09 01:43:29 +00:00
{
2022-11-04 13:53:51 +00:00
$WPFUnpin_Search . IsChecked = $true
$WPFUnpin_Task_View . IsChecked = $true
$WPFUnpin_Cortana . IsChecked = $true
$WPFUnpin_People . IsChecked = $true
$WPFUnpin_Ink_Workspace . IsChecked = $true
$WPFUnpin_Touch_Keyboard . IsChecked = $true
2022-10-09 01:43:29 +00:00
}
else
{
2022-11-04 13:53:51 +00:00
$WPFUnpin_Search . IsChecked = $false
$WPFUnpin_Task_View . IsChecked = $false
$WPFUnpin_Cortana . IsChecked = $false
$WPFUnpin_People . IsChecked = $false
$WPFUnpin_Ink_Workspace . IsChecked = $false
$WPFUnpin_Touch_Keyboard . IsChecked = $false
Set-ItemProperty -path " HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search\ " -Name " SearchboxTaskbarMode " -Value 2
Set-ItemProperty -path " HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ " -Name " ShowTaskViewButton " -Value 1
Set-ItemProperty -path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced " -Name " ShowCortanaButton " -Value 1
Set-ItemProperty -path " HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People " -Name " PeopleBand " -Value 1
Set-ItemProperty -path " HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\PenWorkspace\ " -Name " PenWorkspaceButtonDesiredVisibility " -Value 1
Set-ItemProperty -path " HKCU:\SOFTWARE\Microsoft\TabletTip\1.7 " -Name " TipbandDesiredVisibility " -Value 1
2022-10-09 02:49:32 +00:00
Stop-Process -n explorer
2022-10-09 11:08:28 +00:00
c: \ windows \ explorer . exe
2022-10-09 01:43:29 +00:00
}
}
2022-11-04 13:53:51 +00:00
function Unpinabove ( ) {
if ( $WPFUnpin_All_Above_11 . IsChecked )
2022-10-09 01:43:29 +00:00
{
2022-11-04 13:53:51 +00:00
$WPFUnpin_Search11 . IsChecked = $true
$WPFUnpin_Chat . IsChecked = $true
$WPFUnpin_Widget . IsChecked = $true
$WPFUnpin_Task_View_11 . IsChecked = $true
2022-10-09 01:43:29 +00:00
}
else
{
2022-11-04 13:53:51 +00:00
$WPFUnpin_Search11 . IsChecked = $false
$WPFUnpin_Chat . IsChecked = $false
$WPFUnpin_Widget . IsChecked = $false
$WPFUnpin_Task_View_11 . IsChecked = $false
Set-ItemProperty -path " HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search\ " -Name " SearchboxTaskbarMode " -Value 1
Set-ItemProperty -path " HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ " -Name " TaskbarDa " -Value 1
Set-ItemProperty -path " HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ " -Name " TaskbarMn " -Value 1
Set-ItemProperty -path " HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ " -Name " ShowTaskViewButton " -Value 1
Stop-Process -n explorer
c: \ windows \ explorer . exe
2022-10-09 01:43:29 +00:00
}
}
2022-11-04 13:53:51 +00:00
2022-10-09 01:43:29 +00:00
function FileExt ( ) {
2022-11-04 13:53:51 +00:00
if ( $WPFFileExtensions . IsChecked )
2022-10-09 01:43:29 +00:00
{
Set-ItemProperty -Path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ " -Name " HideFileExt " -Value 0
2022-10-09 02:49:32 +00:00
Stop-Process -n explorer
2022-10-09 01:43:29 +00:00
c: \ windows \ explorer . exe
}
else
{
Set-ItemProperty -Path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ " -Name " HideFileExt " -Value 1
2022-10-09 02:49:32 +00:00
Stop-Process -n explorer
2022-10-09 01:43:29 +00:00
c: \ windows \ explorer . exe
}
}
function HiddenFiles ( ) {
2022-11-04 13:53:51 +00:00
if ( $WPFHiddenFiles . IsChecked )
2022-10-09 01:43:29 +00:00
{
Set-ItemProperty -Path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ " -Name " Hidden " -Value 1
2022-10-09 11:08:28 +00:00
Stop-Process -n explorer
2022-10-09 01:43:29 +00:00
c: \ windows \ explorer . exe
}
else
{
Set-ItemProperty -Path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ " -Name " Hidden " -Value 2
2022-10-09 11:08:28 +00:00
Stop-Process -n explorer
2022-10-09 01:43:29 +00:00
c: \ windows \ explorer . exe
}
}
2022-11-04 13:53:51 +00:00
function ICBbutton ( ) {
if ( $WPFItemBoxes . IsChecked )
2022-10-09 02:49:32 +00:00
{
2022-11-04 13:53:51 +00:00
Set-ItemProperty -path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced " -Name " AutoCheckSelect " -Value 1
Stop-Process -n explorer
c: \ windows \ explorer . exe
2022-10-09 02:49:32 +00:00
}
else
{
2022-11-04 13:53:51 +00:00
Set-ItemProperty -path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced " -Name " AutoCheckSelect " -Value 0
Stop-Process -n explorer
c: \ windows \ explorer . exe
2022-10-09 02:49:32 +00:00
}
}
2022-11-04 13:53:51 +00:00
function HideShell ( ) {
if ( $WPFHideShell . IsChecked )
2022-10-11 06:54:57 +00:00
{
2022-11-04 13:53:51 +00:00
powershell . exe -WindowStyle Hidden -file > $null
2022-10-11 06:54:57 +00:00
}
else
{
2022-11-04 13:53:51 +00:00
powershell . exe -WindowStyle Normal -file > $null
2022-10-11 06:54:57 +00:00
}
}
2022-11-04 13:53:51 +00:00
function ChangeTaskBarLocation ( ) {
if ( $WPFTaskbarLeft . IsChecked )
2022-10-10 10:57:04 +00:00
{
2022-11-04 13:53:51 +00:00
Set-ItemProperty -path " HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ " -Name " TaskbarAl " -Value 0
2022-10-10 10:57:04 +00:00
}
else
{
2022-11-04 13:53:51 +00:00
Set-ItemProperty -path " HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ " -Name " TaskbarAl " -Value 1
2022-10-10 10:57:04 +00:00
}
}
2022-11-04 13:53:51 +00:00
function RemTaskView ( ) {
if ( $WPFUnpin_Task_View_11 . IsChecked )
{
Set-ItemProperty -path " HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ " -Name " ShowTaskViewButton " -Value 0
}
else
{
Set-ItemProperty -path " HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ " -Name " ShowTaskViewButton " -Value 1
}
2022-10-11 11:13:19 +00:00
}
2022-11-04 13:53:51 +00:00
function RemChat ( ) {
if ( $WPFUnpin_Chat . IsChecked )
{
Set-ItemProperty -path " HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ " -Name " TaskbarMn " -Value 0
}
else
{
Set-ItemProperty -path " HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ " -Name " TaskbarMn " -Value 1
}
2022-10-11 11:13:19 +00:00
}
2022-11-04 13:53:51 +00:00
function RemWidget ( ) {
if ( $WPFUnpin_Widget . IsChecked )
2022-10-11 11:13:19 +00:00
{
2022-11-04 13:53:51 +00:00
Set-ItemProperty -path " HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ " -Name " TaskbarDa " -Value 0
}
else
{
Set-ItemProperty -path " HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ " -Name " TaskbarDa " -Value 1
2022-10-11 11:13:19 +00:00
}
}
2022-11-04 13:53:51 +00:00
function RemSearch ( ) {
if ( $WPFUnpin_Search11 . IsChecked )
2022-10-11 11:13:19 +00:00
{
2022-11-04 13:53:51 +00:00
Set-ItemProperty -path " HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search\ " -Name " SearchboxTaskbarMode " -Value 0
2022-10-11 11:13:19 +00:00
}
else
2022-10-31 08:48:24 +00:00
{
2022-11-04 13:53:51 +00:00
Set-ItemProperty -path " HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search\ " -Name " SearchboxTaskbarMode " -Value 1
}
}
function Win10RC ( ) {
if ( $WPFWin10RC . IsChecked )
{
reg . exe add " HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32 " / f / ve
2022-10-31 08:48:24 +00:00
Stop-Process -n explorer
c: \ windows \ explorer . exe
}
else
{
2022-11-04 13:53:51 +00:00
reg . exe delete " HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2} " / f
2022-10-31 08:48:24 +00:00
Stop-Process -n explorer
c: \ windows \ explorer . exe
2022-10-29 23:25:35 +00:00
}
2022-10-31 08:48:24 +00:00
}
2022-10-10 10:57:04 +00:00
2022-10-29 15:40:45 +00:00
function RadButton1 {
2022-11-04 13:53:51 +00:00
if ( $WPFRadioButton1 . IsChecked )
2022-10-29 15:40:45 +00:00
{
Set-ItemProperty -path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced " -Name " Start_Layout " -Value 0
Stop-Process -n explorer
c: \ windows \ explorer . exe
}
}
function RadButton2 {
2022-11-04 13:53:51 +00:00
if ( $WPFRadioButton2 . IsChecked )
2022-10-29 15:40:45 +00:00
{
Set-ItemProperty -path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced " -Name " Start_Layout " -Value 1
Stop-Process -n explorer
c: \ windows \ explorer . exe
}
}
function RadButton3 {
2022-11-04 13:53:51 +00:00
if ( $WPFRadioButton3 . IsChecked )
2022-10-29 15:40:45 +00:00
{
Set-ItemProperty -path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced " -Name " Start_Layout " -Value 2
Stop-Process -n explorer
c: \ windows \ explorer . exe
}
}
2022-10-10 10:57:04 +00:00
2022-11-04 13:53:51 +00:00
function DisableAeroShake ( ) {
if ( $WPFAeroShake . IsChecked )
{
Set-ItemProperty -path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced " -Name " DisallowShaking " -Value 1
Stop-Process -n explorer
c: \ windows \ explorer . exe
}
else
{
Set-ItemProperty -path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced " -Name " DisallowShaking " -Value 0
Stop-Process -n explorer
c: \ windows \ explorer . exe
}
}
2022-10-10 10:57:04 +00:00
2022-10-11 06:54:57 +00:00
2022-11-04 13:56:57 +00:00
function ClockSecs ( ) {
if ( $WPFClockDisplay . IsChecked )
{
Set-ItemProperty -path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced " -Name " ShowSecondsInSystemClock " -Value 1
Stop-Process -n explorer
c: \ windows \ explorer . exe
}
else
{
Set-ItemProperty -path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced " -Name " ShowSecondsInSystemClock " -Value 0
Stop-Process -n explorer
c: \ windows \ explorer . exe
}
}
2022-10-09 01:43:29 +00:00
2022-11-05 12:23:34 +00:00
function CompactView ( ) {
if ( $WPFCompactView . IsChecked )
{
Set-ItemProperty -path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ " -Name " UseCompactMode " -Value 1
}
else
{
Set-ItemProperty -path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ " -Name " UseCompactMode " -Value 0
}
}
2022-10-09 01:43:29 +00:00
2022-11-04 13:53:51 +00:00
$WPFUnpin_Search . Add_Checked { RemSearchwin10 }
$WPFUnpin_Search . Add_UnChecked { RemSearchwin10 }
$value6 = Get-ItemProperty -path " HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search\ " -Name " SearchboxTaskbarMode "
if ( $value6 . SearchboxTaskbarMode -eq 0 )
2022-10-09 01:43:29 +00:00
{
2022-11-04 13:53:51 +00:00
$WPFUnpin_Search . IsChecked = $true
2022-10-09 01:43:29 +00:00
}
2022-11-04 13:53:51 +00:00
$WPFUnpin_Task_View . Add_Checked ( { RemTaskViewwin10 } )
$WPFUnpin_Task_View . Add_UnChecked ( { RemTaskViewwin10 } )
$value7 = Get-ItemProperty -path " HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ " -Name " ShowTaskViewButton "
if ( $value7 . ShowTaskViewButton -eq 0 )
{
$WPFUnpin_Task_View . IsChecked = $true
}
2022-10-10 10:57:04 +00:00
2022-11-04 13:53:51 +00:00
$WPFUnpin_Cortana . Add_Checked ( { RemCortana } )
$WPFUnpin_Cortana . Add_UnChecked ( { RemCortana } )
$value8 = Get-ItemProperty -path " HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ " -Name " ShowCortanaButton "
if ( $value8 . ShowCortanaButton -eq 0 )
2022-10-10 10:57:04 +00:00
{
2022-11-04 13:53:51 +00:00
$WPFUnpin_Cortana . IsChecked = $true
2022-10-10 10:57:04 +00:00
}
2022-10-09 01:43:29 +00:00
2022-11-04 13:53:51 +00:00
$WPFUnpin_People . Add_Checked ( { RemPeople } )
$WPFUnpin_People . Add_UnChecked ( { RemPeople } )
$value9 = Get-ItemProperty -path " HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People " -Name " PeopleBand "
2023-11-02 08:08:26 +00:00
if ( $value9 . PeopleBand -eq 0 ) {
$WPFUnpin_People . IsChecked = $true
2022-11-04 13:53:51 +00:00
}
2022-10-09 01:43:29 +00:00
2022-11-04 13:53:51 +00:00
$WPFUnpin_Ink_Workspace . Add_Checked ( { RemInkWS } )
$WPFUnpin_Ink_Workspace . Add_UnChecked ( { RemInkWS } )
$value10 = Get-ItemProperty -path " HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\PenWorkspace\ " -Name " PenWorkspaceButtonDesiredVisibility "
2023-11-02 08:08:26 +00:00
if ( $value10 . PenWorkspaceButtonDesiredVisibility -eq 0 ) {
$WPFUnpin_Ink_Workspace . IsChecked = $true
2022-11-04 13:53:51 +00:00
}
2022-10-09 01:43:29 +00:00
2023-11-02 08:08:26 +00:00
2022-11-04 13:53:51 +00:00
$WPFUnpin_Touch_Keyboard . Add_Checked ( { RemTouchKey } )
$WPFUnpin_Touch_Keyboard . Add_UnChecked ( { RemTouchKey } )
$value11 = Get-ItemProperty -path " HKCU:\SOFTWARE\Microsoft\TabletTip\1.7 " -Name " TipbandDesiredVisibility "
2023-11-02 08:08:26 +00:00
if ( $value11 . TipbandDesiredVisibility -eq 0 )
{
$WPFUnpin_Touch_Keyboard . IsChecked = $true
2022-10-09 01:43:29 +00:00
}
2022-10-10 10:57:04 +00:00
2022-11-04 13:53:51 +00:00
$WPFTaskbarLeft . Add_Checked ( { ChangeTaskBarLocation } )
$WPFTaskbarLeft . Add_UnChecked ( { ChangeTaskBarLocation } )
$value = Get-ItemProperty -Path " HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ " -Name " TaskbarAl "
if ( $value . TaskbarAl -eq 0 )
2022-10-10 10:57:04 +00:00
{
2022-11-04 13:53:51 +00:00
$WPFTaskbarLeft . IsChecked = $true
2022-10-10 10:57:04 +00:00
}
2022-11-04 13:53:51 +00:00
$WPFUnpin_Task_View_11 . Add_Checked ( { RemTaskView } )
$WPFUnpin_Task_View_11 . Add_UnChecked ( { RemTaskView } )
$value2 = Get-ItemProperty -path " HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ " -Name " ShowTaskViewButton "
if ( $value2 . ShowTaskViewButton -eq 0 )
{
$WPFUnpin_Task_View_11 . IsChecked = $true
}
2022-10-09 01:43:29 +00:00
2022-11-04 13:53:51 +00:00
$WPFUnpin_Chat . Add_Checked ( { RemChat } )
$WPFUnpin_Chat . Add_UnChecked ( { RemChat } )
2022-10-09 01:43:29 +00:00
$value3 = Get-ItemProperty -path " HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ " -Name " TaskbarMn "
if ( $value3 . TaskbarMn -eq 0 )
{
2022-11-04 13:53:51 +00:00
$WPFUnpin_Chat . IsChecked = $true
2022-10-09 01:43:29 +00:00
}
2022-11-04 13:53:51 +00:00
$WPFUnpin_Widget . Add_Checked ( { RemWidget } )
$WPFUnpin_Widget . Add_UnChecked ( { RemWidget } )
$value4 = Get-ItemProperty -path " HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ " -Name " TaskbarDa "
if ( $value4 . TaskbarDa -eq 0 )
2022-10-09 01:43:29 +00:00
{
2022-11-04 13:53:51 +00:00
$WPFUnpin_Widget . IsChecked = $true
2022-10-10 10:57:04 +00:00
}
2022-11-04 13:53:51 +00:00
$WPFUnpin_Search11 . Add_Checked ( { RemSearch } )
$WPFUnpin_Search11 . Add_UnChecked ( { RemSearch } )
$value5 = Get-ItemProperty -path " HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search\ " -Name " SearchboxTaskbarMode "
if ( $value5 . SearchboxTaskbarMode -eq 0 )
{
$WPFUnpin_Search11 . IsChecked = $true
2022-11-04 13:56:57 +00:00
}
$WPFClockDisplay . Add_Checked ( { ClockSecs } )
$WPFClockDisplay . Add_UnChecked ( { ClockSecs } )
$value12 = Get-ItemProperty -path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced " -Name " ShowSecondsInSystemClock "
if ( $value12 . ShowSecondsInSystemClock -eq 1 )
{
$WPFClockDisplay . IsChecked = $true
2022-10-09 01:43:29 +00:00
}
2022-10-29 15:40:45 +00:00
2022-11-04 13:53:51 +00:00
$WPFRadioButton1 . Add_Checked ( { RadButton1 } )
$WPFRadioButton1 . Add_UnChecked ( { RadButton1 } )
$WPFRadioButton2 . Add_Checked ( { RadButton2 } )
$WPFRadioButton2 . Add_UnChecked ( { RadButton2 } )
$WPFRadioButton3 . Add_Checked ( { RadButton3 } )
$WPFRadioButton3 . Add_UnChecked ( { RadButton3 } )
2022-10-29 15:40:45 +00:00
$value16 = Get-ItemProperty -path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced " -Name " Start_Layout "
if ( $value16 . Start_Layout -eq 0 )
{
2022-11-04 13:53:51 +00:00
$WPFRadioButton1 . IsChecked = $true
2022-10-29 15:40:45 +00:00
}
elseif ( $value16 . Start_Layout -eq 1 )
{
2022-11-04 13:53:51 +00:00
$WPFRadioButton2 . IsChecked = $true
2022-10-29 15:40:45 +00:00
}
elseif ( $value16 . Start_Layout -eq 2 )
{
2022-11-04 13:53:51 +00:00
$WPFRadioButton3 . IsChecked = $true
2022-10-29 15:40:45 +00:00
}
2022-10-11 06:54:57 +00:00
2022-11-04 13:53:51 +00:00
$WPFWin10RC . Add_Checked ( { Win10RC } )
$WPFWin10RC . Add_UnChecked ( { Win10RC } )
if ( Test-Path 'HKCU:\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32' )
2022-10-11 06:54:57 +00:00
{
2022-11-04 13:53:51 +00:00
$WPFWin10RC . IsChecked = $true
2022-10-11 06:54:57 +00:00
}
2022-11-04 13:53:51 +00:00
$WPFAeroShake . Add_Checked ( { DisableAeroShake } )
$WPFAeroShake . Add_UnChecked ( { DisableAeroShake } )
2022-10-11 06:54:57 +00:00
2022-11-04 13:53:51 +00:00
$value14 = Get-ItemProperty -path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced " -Name " DisallowShaking "
if ( $value14 . DisallowShaking -eq 1 )
2022-10-11 06:54:57 +00:00
{
2022-11-04 13:53:51 +00:00
$WPFAeroShake . IsChecked = $true
2022-10-11 06:54:57 +00:00
}
#========================================================
# Unpin/pin all
#========================================================
2022-11-04 13:53:51 +00:00
$WPFUnpin_All_Above . Add_Checked ( { Unpinabovewin10 } )
$WPFUnpin_All_Above . Add_UnChecked ( { Unpinabovewin10 } )
2022-10-11 06:54:57 +00:00
if ( $value6 . SearchboxTaskbarMode -eq 0 )
{
if ( $value7 . ShowTaskViewButton -eq 0 )
{
if ( $value8 . ShowCortanaButton -eq 0 )
{
if ( $value9 . PeopleBand -eq 0 )
{
if ( $value10 . PenWorkspaceButtonDesiredVisibility -eq 0 )
{
if ( $value11 . TipbandDesiredVisibility -eq 0 )
{
2022-11-04 13:53:51 +00:00
$WPFUnpin_All_Above . IsChecked = $true
2022-10-11 06:54:57 +00:00
}
}
}
}
}
}
else {
2022-11-04 13:53:51 +00:00
$WPFUnpin_All_Above . IsChecked = $false
2022-10-11 06:54:57 +00:00
}
2022-10-09 01:43:29 +00:00
2022-10-10 10:57:04 +00:00
2022-11-04 13:53:51 +00:00
$WPFUnpin_All_Above_11 . Add_Checked ( { Unpinabove } )
$WPFUnpin_All_Above_11 . Add_UnChecked ( { Unpinabove } )
if ( $value2 . ShowTaskViewButton -eq 0 )
{
if ( $value3 . TaskbarMn -eq 0 )
{
if ( $value4 . TaskbarDa -eq 0 )
{
if ( $value5 . SearchboxTaskbarMode -eq 0 )
{
$WPFUnpin_All_Above_11 . IsChecked = $true
}
}
}
}
else {
$WPFUnpin_All_Above_11 . IsChecked = $false
}
2022-10-09 01:43:29 +00:00
2022-11-04 13:53:51 +00:00
$WPFCompactView . Add_Checked ( { CompactView } )
2022-11-05 12:23:34 +00:00
$WPFCompactView . Add_UnChecked ( { CompactView } )
2022-10-29 23:41:27 +00:00
$value30 = Get-ItemProperty -path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced " -Name " UseCompactMode "
if ( $value30 . UseCompactMode -eq 1 )
2022-10-09 01:43:29 +00:00
{
2022-11-04 13:53:51 +00:00
$WPFCompactView . IsChecked = $true
2022-10-09 01:43:29 +00:00
}
2022-10-29 23:25:35 +00:00
2022-10-09 01:43:29 +00:00
2022-11-04 13:53:51 +00:00
$WPFHiddenFiles . Add_Checked ( { HiddenFiles } )
$WPFHiddenFiles . Add_UnChecked ( { HiddenFiles } )
2022-10-29 23:41:27 +00:00
$value31 = Get-ItemProperty -path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced " -Name " HideFileExt "
if ( $value31 . HideFileExt -eq 0 )
2022-10-09 01:43:29 +00:00
{
2022-11-04 13:53:51 +00:00
$WPFHiddenFiles . IsChecked = $true
2022-10-09 01:43:29 +00:00
}
2022-11-04 13:53:51 +00:00
$WPFFileExtensions . Add_Checked ( { FileExt } )
$WPFFileExtensions . Add_UnChecked ( { FileExt } )
2022-10-29 23:41:27 +00:00
$value32 = Get-ItemProperty -path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced " -Name " Hidden "
if ( $value32 . Hidden -eq 1 )
2022-10-09 01:43:29 +00:00
{
2022-11-04 13:53:51 +00:00
$WPFFileExtensions . IsChecked = $true
2022-10-09 01:43:29 +00:00
}
2022-10-10 10:57:04 +00:00
2022-11-04 13:53:51 +00:00
$WPFItemBoxes . Add_Checked ( { ICBbutton } )
$WPFItemBoxes . Add_UnChecked ( { ICBbutton } )
$value17 = Get-ItemProperty -path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced " -Name " AutoCheckSelect "
if ( $value17 . AutoCheckSelect -eq 1 )
2022-10-11 11:13:19 +00:00
{
2022-11-04 13:53:51 +00:00
$WPFItemBoxes . IsChecked = $true
2022-10-11 11:13:19 +00:00
}
2022-11-04 13:53:51 +00:00
$value4 = Get-ItemProperty -path " HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ " -Name " TaskbarDa "
if ( $value4 . TaskbarDa -eq 0 )
2022-10-11 11:13:19 +00:00
{
}
2022-10-09 01:43:29 +00:00
2022-10-09 13:20:55 +00:00
2022-10-09 01:43:29 +00:00
2022-10-10 10:57:04 +00:00
2022-10-09 01:43:29 +00:00
2022-10-09 20:05:48 +00:00
2022-10-11 11:13:19 +00:00
2022-11-04 13:53:51 +00:00
function Win10 {
$WPFUnpin_Search . Visibility = " Visible "
$WPFUnpin_Task_View . Visibility = " Visible "
$WPFUnpin_Cortana . Visibility = " Visible "
$WPFUnpin_People . Visibility = " Visible "
$WPFUnpin_Ink_Workspace . Visibility = " Visible "
$WPFUnpin_Touch_Keyboard . Visibility = " Visible "
$WPFUnpin_All_Above . Visibility = " Visible "
$WPFClockDisplay . Visibility = " Visible "
$WPFOSLabel . Content = " Windows 10 Detected "
}
2022-10-11 11:13:19 +00:00
2022-11-04 13:53:51 +00:00
function Win11 {
$WPFCompactView . Visibility = " Visible "
$WPFGridGroupBox . Visibility = " Visible "
$WPFLabel_22h2 . Visibility = " Visible "
$WPFOSLabel . Content = " Windows 11 Detected "
$WPFTaskbarLeft . Visibility = " Visible "
$WPFUnpin_Search11 . Visibility = " Visible "
$WPFUnpin_Task_View_11 . Visibility = " Visible "
$WPFUnpin_Widget . Visibility = " Visible "
$WPFUnpin_Chat . Visibility = " Visible "
$WPFUnpin_All_Above_11 . Visibility = " Visible "
$WPFWin10RC . Visibility = " Visible "
}
2022-10-09 20:05:48 +00:00
2022-10-11 11:13:19 +00:00
2022-10-11 06:54:57 +00:00
#========================================================
2022-11-04 13:53:51 +00:00
# Tab 4 Powershell Settings
2022-10-11 06:54:57 +00:00
#========================================================
2022-10-09 20:05:48 +00:00
2022-11-04 13:53:51 +00:00
$WPFHideShell . Add_Checked ( { HideShell } )
$WPFHideShell . Add_UnChecked ( { HideShell } )
2022-10-10 10:57:04 +00:00
2022-11-04 13:53:51 +00:00
#Disable Both win 10 and 11 stuff
2022-10-10 10:57:04 +00:00
2022-11-04 13:53:51 +00:00
$WPFUnpin_Search . Visibility = " Hidden "
$WPFUnpin_Task_View . Visibility = " Hidden "
$WPFUnpin_Cortana . Visibility = " Hidden "
$WPFUnpin_People . Visibility = " Hidden "
$WPFUnpin_Ink_Workspace . Visibility = " Hidden "
$WPFUnpin_Touch_Keyboard . Visibility = " Hidden "
$WPFUnpin_All_Above . Visibility = " Hidden "
$WPFClockDisplay . Visibility = " Hidden "
$WPFCompactView . Visibility = " Hidden "
$WPFLabel_22h2 . Visibility = " Hidden "
$WPFGridGroupBox . Visibility = " Hidden "
$WPFTaskbarLeft . Visibility = " Hidden "
$WPFUnpin_Search11 . Visibility = " Hidden "
$WPFUnpin_Task_View_11 . Visibility = " Hidden "
$WPFUnpin_Widget . Visibility = " Hidden "
$WPFUnpin_Chat . Visibility = " Hidden "
$WPFUnpin_All_Above_11 . Visibility = " Hidden "
$WPFWin10RC . Visibility = " Hidden "
2022-10-11 11:13:19 +00:00
2022-10-10 10:57:04 +00:00
2022-10-29 23:29:42 +00:00
2023-11-02 08:08:26 +00:00
OlaYZen
2022-10-29 23:33:12 +00:00
2023-11-01 14:08:05 +00:00
if ( $windowsVersion -eq 10 ) {
Win10
} elseif ( $windowsVersion -eq 11 ) {
Win11
} else {
$WPFOSLabel . Content = " OS NOT DETECTED "
}
2022-10-09 01:43:29 +00:00
2022-11-04 13:53:51 +00:00
2022-10-09 01:43:29 +00:00
2023-11-02 09:22:48 +00:00
$Form . ShowDialog ( )