mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2026-08-09 17:41:14 +10:00
Update Invoke-WPFButton.ps1
This commit is contained in:
@@ -81,8 +81,24 @@ function Invoke-WPFButton {
|
|||||||
}
|
}
|
||||||
"WPFRemoveSelectedAppx" {
|
"WPFRemoveSelectedAppx" {
|
||||||
Get-Process -Name *widget*, *game*, dllhost -ErrorAction SilentlyContinue | Stop-Process -Force
|
Get-Process -Name *widget*, *game*, dllhost -ErrorAction SilentlyContinue | Stop-Process -Force
|
||||||
Invoke-WPFAppxRemoval
|
$apps = $sync.configs.appxHashtable
|
||||||
|
|
||||||
|
Invoke-WPFRunspace -ParameterList @(("selected", $selected),("apps", $apps)) -ScriptBlock {
|
||||||
|
param($selected, $apps)
|
||||||
|
|
||||||
|
foreach ($key in $selected) {
|
||||||
|
$package = $apps[$key].PackageId
|
||||||
|
|
||||||
|
Write-Host "Removing $package"
|
||||||
|
Get-AppxPackage -Name $package -AllUsers | Remove-AppxPackage -AllUsers
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "================================="
|
||||||
|
Write-Host "-- AppX Removal Finished ---"
|
||||||
|
Write-Host "================================="
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
"WPFCloseButton" {$sync.Form.Close(); Write-Host "Bye bye!"}
|
"WPFCloseButton" {$sync.Form.Close(); Write-Host "Bye bye!"}
|
||||||
"WPFMinimizeButton" {$sync.Form.WindowState = [Windows.WindowState]::Minimized}
|
"WPFMinimizeButton" {$sync.Form.WindowState = [Windows.WindowState]::Minimized}
|
||||||
"WPFselectedAppsButton" {$sync.selectedAppsPopup.IsOpen = -not $sync.selectedAppsPopup.IsOpen}
|
"WPFselectedAppsButton" {$sync.selectedAppsPopup.IsOpen = -not $sync.selectedAppsPopup.IsOpen}
|
||||||
|
|||||||
Reference in New Issue
Block a user