Skip to content
This repository has been archived by the owner on Sep 21, 2023. It is now read-only.

Commit

Permalink
Added Unpin tiles from start menu option
Browse files Browse the repository at this point in the history
  • Loading branch information
Vikingat-RAGE committed Feb 16, 2019
1 parent 7e08370 commit b202151
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 3 deletions.
9 changes: 9 additions & 0 deletions Individual Scripts/Unpin Start
@@ -0,0 +1,9 @@
#https://superuser.com/questions/1068382/how-to-remove-all-the-tiles-in-the-windows-10-start-menu
#Unpins all tiles from the Start Menu
Write-Output "Unpinning all tiles from the start menu"
(New-Object -Com Shell.Application).
NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').
Items() |
%{ $_.Verbs() } |
?{$_.Name -match 'Un.*pin from Start'} |
%{$_.DoIt()}
30 changes: 27 additions & 3 deletions Windows10Debloater.ps1
Expand Up @@ -628,6 +628,18 @@ Function UninstallOneDrive {
}
}

Function UnpinStart {
#https://superuser.com/questions/1068382/how-to-remove-all-the-tiles-in-the-windows-10-start-menu
#Unpins all tiles from the Start Menu
Write-Output "Unpinning all tiles from the start menu"
(New-Object -Com Shell.Application).
NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').
Items() |
%{ $_.Verbs() } |
?{$_.Name -match 'Un.*pin from Start'} |
%{$_.DoIt()}
}

#GUI prompt Debloat/Revert options and GUI variables
$Button = [Windows.MessageBoxButton]::YesNoCancel
$ErrorIco = [Windows.MessageBoxImage]::Error
Expand All @@ -645,7 +657,7 @@ $EdgePdf = "Do you want to stop edge from taking over as the default PDF viewer?
$EdgePdf2 = "Do you want to revert changes that disabled Edge as the default PDF viewer?"
$Reboot = "For some of the changes to properly take effect it is recommended to reboot your machine. Would you like to restart?"
$OneDriveDelete = "Do you want to uninstall One Drive?"

$Unpin = "Do you want to unpin all items from the Start menu?"
$Prompt1 = [Windows.MessageBox]::Show($Ask, "Debloat or Revert", $Button, $ErrorIco)
Switch ($Prompt1) {
#This will debloat Windows 10
Expand Down Expand Up @@ -744,9 +756,21 @@ Switch ($Prompt1) {
Write-Output "You have chosen to skip removing OneDrive from your machine."
}
}
#Prompt asking if you'd like to reboot your machine
$Prompt5 = [Windows.MessageBox]::Show($Reboot, "Reboot", $Button, $Warn)
#Prompt asking if you'd like to unpin all start items
$Prompt5 = [Windows.MessageBox]::Show($Unpin, "Unpin", $Button, $ErrorIco)
Switch ($Prompt5) {
Yes {
UnpinStart
Write-Output "Start Apps unpined."
}
No {
Write-Output "You have chosen to skip removing OneDrive from your machine."

}
}
#Prompt asking if you'd like to reboot your machine
$Prompt6 = [Windows.MessageBox]::Show($Reboot, "Reboot", $Button, $Warn)
Switch ($Prompt6) {
Yes {
Write-Output "Unloading the HKCR drive..."
Remove-PSDrive HKCR
Expand Down

0 comments on commit b202151

Please sign in to comment.