mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-12-21 21:41:29 -06:00
Fix language and Logic to Updates (#3087)
This commit is contained in:
parent
d6c1fbe4a2
commit
cf7f161a06
@ -43,7 +43,7 @@ function Invoke-WPFButton {
|
|||||||
"WPFPanelprinter" {Invoke-WPFControlPanel -Panel $button}
|
"WPFPanelprinter" {Invoke-WPFControlPanel -Panel $button}
|
||||||
"WPFPanelsystem" {Invoke-WPFControlPanel -Panel $button}
|
"WPFPanelsystem" {Invoke-WPFControlPanel -Panel $button}
|
||||||
"WPFPaneluser" {Invoke-WPFControlPanel -Panel $button}
|
"WPFPaneluser" {Invoke-WPFControlPanel -Panel $button}
|
||||||
"WPFUpdatesdefault" {Invoke-WPFUpdatesdefault}
|
"WPFUpdatesdefault" {Invoke-WPFFixesUpdate}
|
||||||
"WPFFixesUpdate" {Invoke-WPFFixesUpdate}
|
"WPFFixesUpdate" {Invoke-WPFFixesUpdate}
|
||||||
"WPFFixesWinget" {Invoke-WPFFixesWinget}
|
"WPFFixesWinget" {Invoke-WPFFixesWinget}
|
||||||
"WPFRunAdobeCCCleanerTool" {Invoke-WPFRunAdobeCCCleanerTool}
|
"WPFRunAdobeCCCleanerTool" {Invoke-WPFRunAdobeCCCleanerTool}
|
||||||
|
@ -187,9 +187,9 @@ function Invoke-WPFFixesUpdate {
|
|||||||
# Reset the Security Descriptors on the Windows Update Services
|
# Reset the Security Descriptors on the Windows Update Services
|
||||||
Write-Progress -Id 0 -Activity "Repairing Windows Update" -Status "Resetting the WU Service Security Descriptors..." -PercentComplete 25
|
Write-Progress -Id 0 -Activity "Repairing Windows Update" -Status "Resetting the WU Service Security Descriptors..." -PercentComplete 25
|
||||||
Write-Progress -Id 4 -ParentId 0 -Activity "Resetting the WU Service Security Descriptors" -Status "Resetting the BITS Security Descriptor..." -PercentComplete 0
|
Write-Progress -Id 4 -ParentId 0 -Activity "Resetting the WU Service Security Descriptors" -Status "Resetting the BITS Security Descriptor..." -PercentComplete 0
|
||||||
Start-Process -NoNewWindow -FilePath "sc.exe" -ArgumentList "sdset", "bits", "D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)"
|
Start-Process -NoNewWindow -FilePath "sc.exe" -ArgumentList "sdset", "bits", "D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)" -Wait
|
||||||
Write-Progress -Id 4 -ParentId 0 -Activity "Resetting the WU Service Security Descriptors" -Status "Resetting the wuauserv Security Descriptor..." -PercentComplete 50
|
Write-Progress -Id 4 -ParentId 0 -Activity "Resetting the WU Service Security Descriptors" -Status "Resetting the wuauserv Security Descriptor..." -PercentComplete 50
|
||||||
Start-Process -NoNewWindow -FilePath "sc.exe" -ArgumentList "sdset", "wuauserv", "D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)"
|
Start-Process -NoNewWindow -FilePath "sc.exe" -ArgumentList "sdset", "wuauserv", "D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)" -Wait
|
||||||
Write-Progress -Id 4 -ParentId 0 -Activity "Resetting the WU Service Security Descriptors" -Status "Completed" -PercentComplete 100
|
Write-Progress -Id 4 -ParentId 0 -Activity "Resetting the WU Service Security Descriptors" -Status "Completed" -PercentComplete 100
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -221,19 +221,53 @@ function Invoke-WPFFixesUpdate {
|
|||||||
if (Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate") {
|
if (Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate") {
|
||||||
Write-Progress -Id 0 -Activity "Repairing Windows Update" -Status "Removing WSUS client settings..." -PercentComplete 60
|
Write-Progress -Id 0 -Activity "Repairing Windows Update" -Status "Removing WSUS client settings..." -PercentComplete 60
|
||||||
Write-Progress -Id 6 -ParentId 0 -Activity "Removing WSUS client settings" -PercentComplete 0
|
Write-Progress -Id 6 -ParentId 0 -Activity "Removing WSUS client settings" -PercentComplete 0
|
||||||
Start-Process -NoNewWindow -FilePath "REG" -ArgumentList "DELETE", "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate", "/v", "AccountDomainSid", "/f" -RedirectStandardError $true
|
Start-Process -NoNewWindow -FilePath "REG" -ArgumentList "DELETE", "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate", "/v", "AccountDomainSid", "/f" -RedirectStandardError "NUL"
|
||||||
Start-Process -NoNewWindow -FilePath "REG" -ArgumentList "DELETE", "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate", "/v", "PingID", "/f" -RedirectStandardError $true
|
Start-Process -NoNewWindow -FilePath "REG" -ArgumentList "DELETE", "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate", "/v", "PingID", "/f" -RedirectStandardError "NUL"
|
||||||
Start-Process -NoNewWindow -FilePath "REG" -ArgumentList "DELETE", "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate", "/v", "SusClientId", "/f" -RedirectStandardError $true
|
Start-Process -NoNewWindow -FilePath "REG" -ArgumentList "DELETE", "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate", "/v", "SusClientId", "/f" -RedirectStandardError "NUL"
|
||||||
Write-Progress -Id 6 -ParentId 0 -Activity "Removing WSUS client settings" -Status "Completed" -PercentComplete 100
|
Write-Progress -Id 6 -ParentId 0 -Activity "Removing WSUS client settings" -Status "Completed" -PercentComplete 100
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Remove Group Policy Windows Update settings
|
||||||
|
Write-Progress -Id 0 -Activity "Repairing Windows Update" -Status "Removing Group Policy Windows Update settings..." -PercentComplete 60
|
||||||
|
Write-Progress -Id 7 -ParentId 0 -Activity "Removing Group Policy Windows Update settings" -PercentComplete 0
|
||||||
|
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "ExcludeWUDriversInQualityUpdate" -ErrorAction SilentlyContinue
|
||||||
|
Write-Host "Defaulting driver offering through Windows Update..."
|
||||||
|
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Device Metadata" -Name "PreventDeviceMetadataFromNetwork" -ErrorAction SilentlyContinue
|
||||||
|
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DriverSearching" -Name "DontPromptForWindowsUpdate" -ErrorAction SilentlyContinue
|
||||||
|
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DriverSearching" -Name "DontSearchWindowsUpdate" -ErrorAction SilentlyContinue
|
||||||
|
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DriverSearching" -Name "DriverUpdateWizardWuSearchEnabled" -ErrorAction SilentlyContinue
|
||||||
|
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "ExcludeWUDriversInQualityUpdate" -ErrorAction SilentlyContinue
|
||||||
|
Write-Host "Defaulting Windows Update automatic restart..."
|
||||||
|
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "NoAutoRebootWithLoggedOnUsers" -ErrorAction SilentlyContinue
|
||||||
|
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "AUPowerManagement" -ErrorAction SilentlyContinue
|
||||||
|
Write-Host "Clearing ANY Windows Update Policy settings..."
|
||||||
|
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "BranchReadinessLevel" -ErrorAction SilentlyContinue
|
||||||
|
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "DeferFeatureUpdatesPeriodInDays" -ErrorAction SilentlyContinue
|
||||||
|
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "DeferQualityUpdatesPeriodInDays" -ErrorAction SilentlyContinue
|
||||||
|
Remove-Item -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies" -Recurse -Force -ErrorAction SilentlyContinue
|
||||||
|
Remove-Item -Path "HKCU:\Software\Microsoft\WindowsSelfHost" -Recurse -Force -ErrorAction SilentlyContinue
|
||||||
|
Remove-Item -Path "HKCU:\Software\Policies" -Recurse -Force -ErrorAction SilentlyContinue
|
||||||
|
Remove-Item -Path "HKLM:\Software\Microsoft\Policies" -Recurse -Force -ErrorAction SilentlyContinue
|
||||||
|
Remove-Item -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies" -Recurse -Force -ErrorAction SilentlyContinue
|
||||||
|
Remove-Item -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\WindowsStore\WindowsUpdate" -Recurse -Force -ErrorAction SilentlyContinue
|
||||||
|
Remove-Item -Path "HKLM:\Software\Microsoft\WindowsSelfHost" -Recurse -Force -ErrorAction SilentlyContinue
|
||||||
|
Remove-Item -Path "HKLM:\Software\Policies" -Recurse -Force -ErrorAction SilentlyContinue
|
||||||
|
Remove-Item -Path "HKLM:\Software\WOW6432Node\Microsoft\Policies" -Recurse -Force -ErrorAction SilentlyContinue
|
||||||
|
Remove-Item -Path "HKLM:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Policies" -Recurse -Force -ErrorAction SilentlyContinue
|
||||||
|
Remove-Item -Path "HKLM:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\WindowsStore\WindowsUpdate" -Recurse -Force -ErrorAction SilentlyContinue
|
||||||
|
Start-Process -NoNewWindow -FilePath "secedit" -ArgumentList "/configure", "/cfg", "$env:windir\inf\defltbase.inf", "/db", "defltbase.sdb", "/verbose" -Wait
|
||||||
|
Start-Process -NoNewWindow -FilePath "cmd.exe" -ArgumentList "/c RD /S /Q $env:WinDir\System32\GroupPolicyUsers" -Wait
|
||||||
|
Start-Process -NoNewWindow -FilePath "cmd.exe" -ArgumentList "/c RD /S /Q $env:WinDir\System32\GroupPolicy" -Wait
|
||||||
|
Start-Process -NoNewWindow -FilePath "gpupdate" -ArgumentList "/force" -Wait
|
||||||
|
Write-Progress -Id 7 -ParentId 0 -Activity "Removing Group Policy Windows Update settings" -Status "Completed" -PercentComplete 100
|
||||||
|
|
||||||
|
|
||||||
# Reset WinSock
|
# Reset WinSock
|
||||||
Write-Progress -Id 0 -Activity "Repairing Windows Update" -Status "Resetting WinSock..." -PercentComplete 65
|
Write-Progress -Id 0 -Activity "Repairing Windows Update" -Status "Resetting WinSock..." -PercentComplete 65
|
||||||
Write-Progress -Id 7 -ParentId 0 -Activity "Resetting WinSock" -Status "Resetting WinSock..." -PercentComplete 0
|
Write-Progress -Id 7 -ParentId 0 -Activity "Resetting WinSock" -Status "Resetting WinSock..." -PercentComplete 0
|
||||||
Start-Process -NoNewWindow -FilePath "netsh" -ArgumentList "winsock", "reset" -RedirectStandardOutput $true
|
Start-Process -NoNewWindow -FilePath "netsh" -ArgumentList "winsock", "reset"
|
||||||
Start-Process -NoNewWindow -FilePath "netsh" -ArgumentList "winhttp", "reset", "proxy" -RedirectStandardOutput $true
|
Start-Process -NoNewWindow -FilePath "netsh" -ArgumentList "winhttp", "reset", "proxy"
|
||||||
Start-Process -NoNewWindow -FilePath "netsh" -ArgumentList "int", "ip", "reset" -RedirectStandardOutput $true
|
Start-Process -NoNewWindow -FilePath "netsh" -ArgumentList "int", "ip", "reset"
|
||||||
Write-Progress -Id 7 -ParentId 0 -Activity "Resetting WinSock" -Status "Completed" -PercentComplete 100
|
Write-Progress -Id 7 -ParentId 0 -Activity "Resetting WinSock" -Status "Completed" -PercentComplete 100
|
||||||
|
|
||||||
|
|
||||||
@ -262,7 +296,11 @@ function Invoke-WPFFixesUpdate {
|
|||||||
# Force Windows Update to check for updates
|
# Force Windows Update to check for updates
|
||||||
Write-Progress -Id 0 -Activity "Repairing Windows Update" -Status "Forcing discovery..." -PercentComplete 95
|
Write-Progress -Id 0 -Activity "Repairing Windows Update" -Status "Forcing discovery..." -PercentComplete 95
|
||||||
Write-Progress -Id 10 -ParentId 0 -Activity "Forcing discovery" -Status "Forcing discovery..." -PercentComplete 0
|
Write-Progress -Id 10 -ParentId 0 -Activity "Forcing discovery" -Status "Forcing discovery..." -PercentComplete 0
|
||||||
(New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow()
|
try {
|
||||||
|
(New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow()
|
||||||
|
} catch {
|
||||||
|
Write-Warning "Failed to create Windows Update COM object: $_"
|
||||||
|
}
|
||||||
Start-Process -NoNewWindow -FilePath "wuauclt" -ArgumentList "/resetauthorization", "/detectnow"
|
Start-Process -NoNewWindow -FilePath "wuauclt" -ArgumentList "/resetauthorization", "/detectnow"
|
||||||
Write-Progress -Id 10 -ParentId 0 -Activity "Forcing discovery" -Status "Completed" -PercentComplete 100
|
Write-Progress -Id 10 -ParentId 0 -Activity "Forcing discovery" -Status "Completed" -PercentComplete 100
|
||||||
Write-Progress -Id 0 -Activity "Repairing Windows Update" -Status "Completed" -PercentComplete 100
|
Write-Progress -Id 0 -Activity "Repairing Windows Update" -Status "Completed" -PercentComplete 100
|
||||||
@ -284,7 +322,7 @@ function Invoke-WPFFixesUpdate {
|
|||||||
Write-Progress -Id 3 -Activity "Renaming/Removing Files" -Completed
|
Write-Progress -Id 3 -Activity "Renaming/Removing Files" -Completed
|
||||||
Write-Progress -Id 4 -Activity "Resetting the WU Service Security Descriptors" -Completed
|
Write-Progress -Id 4 -Activity "Resetting the WU Service Security Descriptors" -Completed
|
||||||
Write-Progress -Id 5 -Activity "Reregistering DLLs" -Completed
|
Write-Progress -Id 5 -Activity "Reregistering DLLs" -Completed
|
||||||
Write-Progress -Id 6 -Activity "Removing WSUS client settings" -Completed
|
Write-Progress -Id 6 -Activity "Removing Group Policy Windows Update settings" -Completed
|
||||||
Write-Progress -Id 7 -Activity "Resetting WinSock" -Completed
|
Write-Progress -Id 7 -Activity "Resetting WinSock" -Completed
|
||||||
Write-Progress -Id 8 -Activity "Deleting BITS jobs" -Completed
|
Write-Progress -Id 8 -Activity "Deleting BITS jobs" -Completed
|
||||||
Write-Progress -Id 9 -Activity "Starting Windows Update Services" -Completed
|
Write-Progress -Id 9 -Activity "Starting Windows Update Services" -Completed
|
||||||
|
@ -98,6 +98,7 @@ function Invoke-WPFUIElements {
|
|||||||
$entrycount = $configHashtable.Keys.Count + $organizedData["0"].Keys.Count
|
$entrycount = $configHashtable.Keys.Count + $organizedData["0"].Keys.Count
|
||||||
$maxcount = [Math]::Round($entrycount / $columncount + 0.5)
|
$maxcount = [Math]::Round($entrycount / $columncount + 0.5)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Iterate through 'organizedData' by panel, category, and application
|
# Iterate through 'organizedData' by panel, category, and application
|
||||||
@ -105,7 +106,7 @@ function Invoke-WPFUIElements {
|
|||||||
foreach ($panelKey in ($organizedData.Keys | Sort-Object)) {
|
foreach ($panelKey in ($organizedData.Keys | Sort-Object)) {
|
||||||
# Create a Border for each column
|
# Create a Border for each column
|
||||||
$border = New-Object Windows.Controls.Border
|
$border = New-Object Windows.Controls.Border
|
||||||
$border.VerticalAlignment = "Stretch" # Ensure the border stretches vertically
|
$border.VerticalAlignment = "Stretch"
|
||||||
[System.Windows.Controls.Grid]::SetColumn($border, $panelcount)
|
[System.Windows.Controls.Grid]::SetColumn($border, $panelcount)
|
||||||
$border.style = $borderstyle
|
$border.style = $borderstyle
|
||||||
$targetGrid.Children.Add($border) | Out-Null
|
$targetGrid.Children.Add($border) | Out-Null
|
||||||
@ -114,10 +115,20 @@ function Invoke-WPFUIElements {
|
|||||||
$stackPanel = New-Object Windows.Controls.StackPanel
|
$stackPanel = New-Object Windows.Controls.StackPanel
|
||||||
$stackPanel.Background = [Windows.Media.Brushes]::Transparent
|
$stackPanel.Background = [Windows.Media.Brushes]::Transparent
|
||||||
$stackPanel.SnapsToDevicePixels = $true
|
$stackPanel.SnapsToDevicePixels = $true
|
||||||
$stackPanel.VerticalAlignment = "Stretch" # Ensure the stack panel stretches vertically
|
$stackPanel.VerticalAlignment = "Stretch"
|
||||||
$border.Child = $stackPanel
|
$border.Child = $stackPanel
|
||||||
$panelcount++
|
$panelcount++
|
||||||
|
|
||||||
|
# Add Windows Version label if this is the updates panel
|
||||||
|
if ($targetGridName -eq "updatespanel") {
|
||||||
|
$windowsVersion = (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion").ProductName
|
||||||
|
$versionLabel = New-Object Windows.Controls.Label
|
||||||
|
$versionLabel.Content = "Windows Version: $windowsVersion"
|
||||||
|
$versionLabel.FontSize = $theme.FontSize
|
||||||
|
$versionLabel.HorizontalAlignment = "Left"
|
||||||
|
$stackPanel.Children.Add($versionLabel) | Out-Null
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($category in ($organizedData[$panelKey].Keys | Sort-Object)) {
|
foreach ($category in ($organizedData[$panelKey].Keys | Sort-Object)) {
|
||||||
$count++
|
$count++
|
||||||
if ($targetGridName -eq "appspanel" -and $columncount -gt 0) {
|
if ($targetGridName -eq "appspanel" -and $columncount -gt 0) {
|
||||||
@ -125,7 +136,7 @@ function Invoke-WPFUIElements {
|
|||||||
if ($panelcount -eq $panelcount2) {
|
if ($panelcount -eq $panelcount2) {
|
||||||
# Create a new Border for the new column
|
# Create a new Border for the new column
|
||||||
$border = New-Object Windows.Controls.Border
|
$border = New-Object Windows.Controls.Border
|
||||||
$border.VerticalAlignment = "Stretch" # Ensure the border stretches vertically
|
$border.VerticalAlignment = "Stretch"
|
||||||
[System.Windows.Controls.Grid]::SetColumn($border, $panelcount)
|
[System.Windows.Controls.Grid]::SetColumn($border, $panelcount)
|
||||||
$border.style = $borderstyle
|
$border.style = $borderstyle
|
||||||
$targetGrid.Children.Add($border) | Out-Null
|
$targetGrid.Children.Add($border) | Out-Null
|
||||||
@ -134,7 +145,7 @@ function Invoke-WPFUIElements {
|
|||||||
$stackPanel = New-Object Windows.Controls.StackPanel
|
$stackPanel = New-Object Windows.Controls.StackPanel
|
||||||
$stackPanel.Background = [Windows.Media.Brushes]::Transparent
|
$stackPanel.Background = [Windows.Media.Brushes]::Transparent
|
||||||
$stackPanel.SnapsToDevicePixels = $true
|
$stackPanel.SnapsToDevicePixels = $true
|
||||||
$stackPanel.VerticalAlignment = "Stretch" # Ensure the stack panel stretches vertically
|
$stackPanel.VerticalAlignment = "Stretch"
|
||||||
$border.Child = $stackPanel
|
$border.Child = $stackPanel
|
||||||
$panelcount++
|
$panelcount++
|
||||||
}
|
}
|
||||||
@ -157,7 +168,7 @@ function Invoke-WPFUIElements {
|
|||||||
if ($panelcount -eq $panelcount2) {
|
if ($panelcount -eq $panelcount2) {
|
||||||
# Create a new Border for the new column
|
# Create a new Border for the new column
|
||||||
$border = New-Object Windows.Controls.Border
|
$border = New-Object Windows.Controls.Border
|
||||||
$border.VerticalAlignment = "Stretch" # Ensure the border stretches vertically
|
$border.VerticalAlignment = "Stretch"
|
||||||
[System.Windows.Controls.Grid]::SetColumn($border, $panelcount)
|
[System.Windows.Controls.Grid]::SetColumn($border, $panelcount)
|
||||||
$border.style = $borderstyle
|
$border.style = $borderstyle
|
||||||
$targetGrid.Children.Add($border) | Out-Null
|
$targetGrid.Children.Add($border) | Out-Null
|
||||||
@ -166,7 +177,7 @@ function Invoke-WPFUIElements {
|
|||||||
$stackPanel = New-Object Windows.Controls.StackPanel
|
$stackPanel = New-Object Windows.Controls.StackPanel
|
||||||
$stackPanel.Background = [Windows.Media.Brushes]::Transparent
|
$stackPanel.Background = [Windows.Media.Brushes]::Transparent
|
||||||
$stackPanel.SnapsToDevicePixels = $true
|
$stackPanel.SnapsToDevicePixels = $true
|
||||||
$stackPanel.VerticalAlignment = "Stretch" # Ensure the stack panel stretches vertically
|
$stackPanel.VerticalAlignment = "Stretch"
|
||||||
$border.Child = $stackPanel
|
$border.Child = $stackPanel
|
||||||
$panelcount++
|
$panelcount++
|
||||||
}
|
}
|
||||||
|
@ -115,6 +115,8 @@ Invoke-WinutilThemeChange -init $true
|
|||||||
Invoke-WPFUIElements -configVariable $sync.configs.applications -targetGridName "appspanel" -columncount 5
|
Invoke-WPFUIElements -configVariable $sync.configs.applications -targetGridName "appspanel" -columncount 5
|
||||||
Invoke-WPFUIElements -configVariable $sync.configs.tweaks -targetGridName "tweakspanel" -columncount 2
|
Invoke-WPFUIElements -configVariable $sync.configs.tweaks -targetGridName "tweakspanel" -columncount 2
|
||||||
Invoke-WPFUIElements -configVariable $sync.configs.feature -targetGridName "featurespanel" -columncount 2
|
Invoke-WPFUIElements -configVariable $sync.configs.feature -targetGridName "featurespanel" -columncount 2
|
||||||
|
# Future implementation: Add Windows Version to updates panel
|
||||||
|
#Invoke-WPFUIElements -configVariable $sync.configs.updates -targetGridName "updatespanel" -columncount 1
|
||||||
|
|
||||||
#===========================================================================
|
#===========================================================================
|
||||||
# Store Form Objects In PowerShell
|
# Store Form Objects In PowerShell
|
||||||
|
@ -996,31 +996,97 @@
|
|||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="Updates" Visibility="Collapsed" Name="WPFTab4">
|
<TabItem Header="Updates" Visibility="Collapsed" Name="WPFTab4">
|
||||||
<ScrollViewer VerticalScrollBarVisibility="Auto" Margin="{DynamicResource TabContentMargin}">
|
<ScrollViewer VerticalScrollBarVisibility="Auto" Margin="{DynamicResource TabContentMargin}">
|
||||||
<Grid Background="Transparent">
|
<Grid Background="Transparent">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<ColumnDefinition Width="*"/>
|
<RowDefinition Height="Auto"/> <!-- Row for the 3 columns -->
|
||||||
<ColumnDefinition Width="*"/>
|
<RowDefinition Height="Auto"/> <!-- Row for Windows Version -->
|
||||||
<ColumnDefinition Width="*"/>
|
</Grid.RowDefinitions>
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Border Grid.Row="0" Grid.Column="0" Style="{StaticResource BorderStyle}">
|
<!-- Three columns container -->
|
||||||
<StackPanel Background="{DynamicResource MainBackgroundColor}" SnapsToDevicePixels="True">
|
<Grid Grid.Row="0">
|
||||||
<Button Name="WPFUpdatesdefault" FontSize="{DynamicResource ConfigTabButtonFontSize}" Height="Auto" Width="Auto" Content="Default (Out of Box) Settings" Margin="20,4,20,10" Padding="10"/>
|
<Grid.ColumnDefinitions>
|
||||||
<TextBlock Foreground="{DynamicResource ComboBoxForegroundColor}" Margin="20,0,20,0" Padding="10" TextWrapping="WrapWithOverflow" MaxWidth="300">This is the default settings that come with Windows. <LineBreak/><LineBreak/> No modifications are made and will remove any custom windows update settings.<LineBreak/><LineBreak/>Note: If you still encounter update errors, reset all updates in the config tab. That will restore ALL Microsoft Update Services from their servers and reinstall them to default settings.</TextBlock>
|
<ColumnDefinition Width="*"/>
|
||||||
</StackPanel>
|
<ColumnDefinition Width="*"/>
|
||||||
</Border>
|
<ColumnDefinition Width="*"/>
|
||||||
<Border Grid.Row="0" Grid.Column="1" Style="{StaticResource BorderStyle}">
|
</Grid.ColumnDefinitions>
|
||||||
<StackPanel Background="{DynamicResource MainBackgroundColor}" SnapsToDevicePixels="True">
|
|
||||||
<Button Name="WPFUpdatessecurity" FontSize="{DynamicResource ConfigTabButtonFontSize}" Height="Auto" Width="Auto" Content="Security (Recommended) Settings" Margin="20,4,20,10" Padding="10"/>
|
<!-- Default Settings -->
|
||||||
<TextBlock Foreground="{DynamicResource ComboBoxForegroundColor}" Margin="20,0,20,0" Padding="10" TextWrapping="WrapWithOverflow" MaxWidth="300">This is my recommended setting I use on all computers.<LineBreak/><LineBreak/> It will delay feature updates by 2 years and will install security updates 4 days after release.<LineBreak/><LineBreak/>Feature Updates: Adds features and often bugs to systems when they are released. You want to delay these as long as possible.<LineBreak/><LineBreak/>Security Updates: Typically these are pressing security flaws that need to be patched quickly. You only want to delay these a couple of days just to see if they are safe and don't break other systems. You don't want to go without these for ANY extended periods of time.</TextBlock>
|
<Border Grid.Column="0" Style="{StaticResource BorderStyle}">
|
||||||
</StackPanel>
|
<StackPanel>
|
||||||
</Border>
|
<Button Name="WPFFixesUpdate"
|
||||||
<Border Grid.Row="0" Grid.Column="2" Style="{StaticResource BorderStyle}">
|
FontSize="{DynamicResource ConfigTabButtonFontSize}"
|
||||||
<StackPanel Background="{DynamicResource MainBackgroundColor}" SnapsToDevicePixels="True">
|
Content="Default Settings"
|
||||||
<Button Name="WPFUpdatesdisable" FontSize="{DynamicResource ConfigTabButtonFontSize}" Height="Auto" Width="Auto" Content="Disable ALL Updates (NOT RECOMMENDED!)" Margin="20,4,20,10" Padding="10,10,10,10"/>
|
Margin="10,5"
|
||||||
<TextBlock Foreground="{DynamicResource ComboBoxForegroundColor}" Margin="20,0,20,0" Padding="10" TextWrapping="WrapWithOverflow" MaxWidth="300">This completely disables ALL Windows Updates and is NOT RECOMMENDED.<LineBreak/><LineBreak/> However, it can be suitable if you use your system for a select purpose and do not actively browse the internet. <LineBreak/><LineBreak/>Note: Your system will be easier to hack and infect without security updates.</TextBlock>
|
Padding="10"/>
|
||||||
<TextBlock Text=" " Margin="20,0,20,0" Padding="10" TextWrapping="WrapWithOverflow" MaxWidth="300"/>
|
<TextBlock Margin="10"
|
||||||
</StackPanel>
|
TextWrapping="Wrap"
|
||||||
</Border>
|
Foreground="{DynamicResource MainForegroundColor}">
|
||||||
|
<Run FontWeight="Bold">Default Windows Update Configuration</Run>
|
||||||
|
<LineBreak/>
|
||||||
|
- No modifications to Windows defaults
|
||||||
|
<LineBreak/>
|
||||||
|
- Removes any custom update settings
|
||||||
|
<LineBreak/><LineBreak/>
|
||||||
|
<Run FontStyle="Italic" FontSize="11">Note: This resets your Windows Update settings to default out of the box settings. It removes ANY policy or customization that has been done to Windows Update.</Run>
|
||||||
|
</TextBlock>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<!-- Security Settings -->
|
||||||
|
<Border Grid.Column="1" Style="{StaticResource BorderStyle}">
|
||||||
|
<StackPanel>
|
||||||
|
<Button Name="WPFUpdatessecurity"
|
||||||
|
FontSize="{DynamicResource ConfigTabButtonFontSize}"
|
||||||
|
Content="Security Settings"
|
||||||
|
Margin="10,5"
|
||||||
|
Padding="10"/>
|
||||||
|
<TextBlock Margin="10"
|
||||||
|
TextWrapping="Wrap"
|
||||||
|
Foreground="{DynamicResource MainForegroundColor}">
|
||||||
|
<Run FontWeight="Bold">Balanced Security Configuration</Run>
|
||||||
|
<LineBreak/>
|
||||||
|
- Feature updates delayed by 2 years
|
||||||
|
<LineBreak/>
|
||||||
|
- Security updates installed after 4 days
|
||||||
|
<LineBreak/><LineBreak/>
|
||||||
|
<Run FontWeight="SemiBold">Feature Updates:</Run> New features and potential bugs
|
||||||
|
<LineBreak/>
|
||||||
|
<Run FontWeight="SemiBold">Security Updates:</Run> Critical security patches
|
||||||
|
<LineBreak/><LineBreak/>
|
||||||
|
<Run FontStyle="Italic" FontSize="11">Note: This only applies to Pro systems that can use group policy.</Run>
|
||||||
|
</TextBlock>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<!-- Disable Updates -->
|
||||||
|
<Border Grid.Column="2" Style="{StaticResource BorderStyle}">
|
||||||
|
<StackPanel>
|
||||||
|
<Button Name="WPFUpdatesdisable"
|
||||||
|
FontSize="{DynamicResource ConfigTabButtonFontSize}"
|
||||||
|
Content="Disable All Updates"
|
||||||
|
Foreground="Red"
|
||||||
|
Margin="10,5"
|
||||||
|
Padding="10"/>
|
||||||
|
<TextBlock Margin="10"
|
||||||
|
TextWrapping="Wrap"
|
||||||
|
Foreground="{DynamicResource MainForegroundColor}">
|
||||||
|
<Run FontWeight="Bold" Foreground="Red">!! Not Recommended !!</Run>
|
||||||
|
<LineBreak/>
|
||||||
|
- Disables ALL Windows Updates
|
||||||
|
<LineBreak/>
|
||||||
|
- Increases security risks
|
||||||
|
<LineBreak/>
|
||||||
|
- Only use for isolated systems
|
||||||
|
<LineBreak/><LineBreak/>
|
||||||
|
<Run FontStyle="Italic" FontSize="11">Warning: Your system will be vulnerable without security updates.</Run>
|
||||||
|
</TextBlock>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<!-- Future Implementation: Add Windows Version to updates panel -->
|
||||||
|
<Grid Name="updatespanel" Grid.Row="1" Background="Transparent">
|
||||||
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
|
Loading…
Reference in New Issue
Block a user