mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-06-28 00:54:47 -05:00
Test 2024 01 02 Main Merge (#1345)
* Add Version to App Display * Keep Windows Security (#1341) Adds a switch to Remove-ProvisionedPackages to determine whether we should remove Windows Security (GUI component, Microsoft.SecHealthUI). This commit fixes issue #1339 * Added scrollbar to all tabs (#1344) * Add scrollbar to Tweaks * Added scrollbar to all tabs * Compile Winutil --------- Co-authored-by: CodingWonders <101426328+CodingWonders@users.noreply.github.com> Co-authored-by: Munkk <152475628+munkk01@users.noreply.github.com> Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com>
This commit is contained in:
@ -90,8 +90,20 @@ function Remove-Packages
|
||||
Write-Progress -Activity "Removing Apps" -Status "Ready" -Completed
|
||||
}
|
||||
|
||||
function Remove-ProvisionedPackages
|
||||
function Remove-ProvisionedPackages([switch] $keepSecurity = $false)
|
||||
{
|
||||
<#
|
||||
|
||||
.SYNOPSIS
|
||||
Removes AppX packages from a Windows image during MicroWin processing
|
||||
|
||||
.PARAMETER Name
|
||||
keepSecurity - Boolean that determines whether to keep "Microsoft.SecHealthUI" (Windows Security) in the Windows image
|
||||
|
||||
.EXAMPLE
|
||||
Remove-ProvisionedPackages -keepSecurity:$false
|
||||
|
||||
#>
|
||||
$appxProvisionedPackages = Get-AppxProvisionedPackage -Path "$($scratchDir)" | Where-Object {
|
||||
$_.PackageName -NotLike "*AppInstaller*" -AND
|
||||
$_.PackageName -NotLike "*Store*" -and
|
||||
@ -107,6 +119,7 @@ function Remove-ProvisionedPackages
|
||||
|
||||
if ($?)
|
||||
{
|
||||
if ($keepSecurity) { $appxProvisionedPackages = $appxProvisionedPackages | Where-Object { $_.PackageName -NotLike "*SecHealthUI*" }}
|
||||
$counter = 0
|
||||
foreach ($appx in $appxProvisionedPackages)
|
||||
{
|
||||
|
Reference in New Issue
Block a user