mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-12-22 05:51:30 -06:00
update
This commit is contained in:
parent
4d2f56bddf
commit
feb1fb4c7c
@ -1,4 +1,10 @@
|
|||||||
Add-Type –assemblyName PresentationFramework
|
<#
|
||||||
|
.NOTES
|
||||||
|
Author : Chris Titus @christitustech
|
||||||
|
GitHub : https://github.com/ChrisTitusTech
|
||||||
|
Version 0.0.2
|
||||||
|
Muilti-Thread and Runspaces addition
|
||||||
|
#>
|
||||||
|
|
||||||
#CREATE HASHTABLE AND RUNSPACE FOR GUI
|
#CREATE HASHTABLE AND RUNSPACE FOR GUI
|
||||||
$syncHash = [hashtable]::Synchronized(@{})
|
$syncHash = [hashtable]::Synchronized(@{})
|
49
winutil.ps1
49
winutil.ps1
@ -626,31 +626,30 @@ $WPFinstall.Add_Click({
|
|||||||
foreach ( $node in $wingetinstall )
|
foreach ( $node in $wingetinstall )
|
||||||
{
|
{
|
||||||
Start-Process powershell.exe -Verb RunAs -ArgumentList "-command winget install -e --accept-source-agreements --accept-package-agreements --silent $node | Out-Host" -Wait -WindowStyle Maximized
|
Start-Process powershell.exe -Verb RunAs -ArgumentList "-command winget install -e --accept-source-agreements --accept-package-agreements --silent $node | Out-Host" -Wait -WindowStyle Maximized
|
||||||
$wingetResult.Add("Installed $node `n")
|
$wingetResult.Add("$node`n")
|
||||||
}
|
}
|
||||||
$wingetResult.ToArray()
|
$wingetResult.ToArray()
|
||||||
$wingetResult | % { $_ } | Out-Host
|
$wingetResult | % { $_ } | Out-Host
|
||||||
$ButtonType = [System.Windows.MessageBoxButton]::OK
|
|
||||||
|
|
||||||
|
# Popup after finished
|
||||||
|
$ButtonType = [System.Windows.MessageBoxButton]::OK
|
||||||
$MessageboxTitle = "Installed Programs "
|
$MessageboxTitle = "Installed Programs "
|
||||||
$Messageboxbody = ($wingetResult)
|
$Messageboxbody = ($wingetResult)
|
||||||
|
$MessageIcon = [System.Windows.MessageBoxImage]::Information
|
||||||
|
|
||||||
$MEssageIcon = [System.Windows.MessageBoxImage]::Information
|
[System.Windows.MessageBox]::Show($Messageboxbody,$MessageboxTitle,$ButtonType,$MessageIcon)
|
||||||
|
|
||||||
[System.Windows.MessageBox]::Show($Messageboxbody,$MessageboxTitle,$ButtonType,$messageicon)
|
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
$WPFInstallUpgrade.Add_Click({
|
$WPFInstallUpgrade.Add_Click({
|
||||||
Start-Process powershell.exe -Verb RunAs -ArgumentList "-command winget upgrade --all | Out-Host" -Wait -WindowStyle Maximized
|
Start-Process powershell.exe -Verb RunAs -ArgumentList "-command winget upgrade --all | Out-Host" -Wait -WindowStyle Maximized
|
||||||
|
|
||||||
$ButtonType = [System.Windows.MessageBoxButton]::OK
|
$ButtonType = [System.Windows.MessageBoxButton]::OK
|
||||||
|
|
||||||
$MessageboxTitle = "Upgraded All Programs "
|
$MessageboxTitle = "Upgraded All Programs "
|
||||||
$Messageboxbody = ("Done")
|
$Messageboxbody = ("Done")
|
||||||
|
$MessageIcon = [System.Windows.MessageBoxImage]::Information
|
||||||
|
|
||||||
$MEssageIcon = [System.Windows.MessageBoxImage]::Information
|
[System.Windows.MessageBox]::Show($Messageboxbody,$MessageboxTitle,$ButtonType,$MessageIcon)
|
||||||
|
|
||||||
[System.Windows.MessageBox]::Show($Messageboxbody,$MessageboxTitle,$ButtonType,$messageicon)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
#===========================================================================
|
#===========================================================================
|
||||||
@ -1192,12 +1191,12 @@ $WPFtweaksbutton.Add_Click({
|
|||||||
Write-Host "Finished Removing Bloatware Apps"
|
Write-Host "Finished Removing Bloatware Apps"
|
||||||
$WPFEssTweaksDeBloat.IsChecked = $false
|
$WPFEssTweaksDeBloat.IsChecked = $false
|
||||||
}
|
}
|
||||||
|
$ButtonType = [System.Windows.MessageBoxButton]::OK
|
||||||
$MessageboxTitle = "Tweaks are Finished "
|
$MessageboxTitle = "Tweaks are Finished "
|
||||||
$Messageboxbody = ("Done")
|
$Messageboxbody = ("Done")
|
||||||
|
$MessageIcon = [System.Windows.MessageBoxImage]::Information
|
||||||
|
|
||||||
$MEssageIcon = [System.Windows.MessageBoxImage]::Information
|
[System.Windows.MessageBox]::Show($Messageboxbody,$MessageboxTitle,$ButtonType,$MessageIcon)
|
||||||
|
|
||||||
[System.Windows.MessageBox]::Show($Messageboxbody,$MessageboxTitle,$ButtonType,$messageicon)
|
|
||||||
})
|
})
|
||||||
#===========================================================================
|
#===========================================================================
|
||||||
# Undo All
|
# Undo All
|
||||||
@ -1330,12 +1329,13 @@ $WPFundoall.Add_Click({
|
|||||||
Write-Host "Done - Reverted to Stock Settings"
|
Write-Host "Done - Reverted to Stock Settings"
|
||||||
|
|
||||||
Write-Host "Essential Undo Completed"
|
Write-Host "Essential Undo Completed"
|
||||||
|
|
||||||
|
$ButtonType = [System.Windows.MessageBoxButton]::OK
|
||||||
$MessageboxTitle = "Undo All"
|
$MessageboxTitle = "Undo All"
|
||||||
$Messageboxbody = ("Done")
|
$Messageboxbody = ("Done")
|
||||||
|
$MessageIcon = [System.Windows.MessageBoxImage]::Information
|
||||||
|
|
||||||
$MEssageIcon = [System.Windows.MessageBoxImage]::Information
|
[System.Windows.MessageBox]::Show($Messageboxbody,$MessageboxTitle,$ButtonType,$MessageIcon)
|
||||||
|
|
||||||
[System.Windows.MessageBox]::Show($Messageboxbody,$MessageboxTitle,$ButtonType,$messageicon)
|
|
||||||
})
|
})
|
||||||
#===========================================================================
|
#===========================================================================
|
||||||
# Tab 3 - Config Buttons
|
# Tab 3 - Config Buttons
|
||||||
@ -1380,12 +1380,12 @@ $WPFFeatureInstall.Add_Click({
|
|||||||
nfsadmin client localhost config fileaccess=755 SecFlavors=+sys -krb5 -krb5i
|
nfsadmin client localhost config fileaccess=755 SecFlavors=+sys -krb5 -krb5i
|
||||||
Write-Host "NFS is now setup for user based NFS mounts"
|
Write-Host "NFS is now setup for user based NFS mounts"
|
||||||
}
|
}
|
||||||
|
$ButtonType = [System.Windows.MessageBoxButton]::OK
|
||||||
$MessageboxTitle = "All features are now installed "
|
$MessageboxTitle = "All features are now installed "
|
||||||
$Messageboxbody = ("Done")
|
$Messageboxbody = ("Done")
|
||||||
|
$MessageIcon = [System.Windows.MessageBoxImage]::Information
|
||||||
|
|
||||||
$MEssageIcon = [System.Windows.MessageBoxImage]::Information
|
[System.Windows.MessageBox]::Show($Messageboxbody,$MessageboxTitle,$ButtonType,$MessageIcon)
|
||||||
|
|
||||||
[System.Windows.MessageBox]::Show($Messageboxbody,$MessageboxTitle,$ButtonType,$messageicon)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
$WPFPanelcontrol.Add_Click({
|
$WPFPanelcontrol.Add_Click({
|
||||||
@ -1599,12 +1599,12 @@ foreach ($service in $services) {
|
|||||||
|
|
||||||
Write-Host "Process complete. Please reboot your computer."
|
Write-Host "Process complete. Please reboot your computer."
|
||||||
|
|
||||||
|
$ButtonType = [System.Windows.MessageBoxButton]::OK
|
||||||
$MessageboxTitle = "Reset Windows Update "
|
$MessageboxTitle = "Reset Windows Update "
|
||||||
$Messageboxbody = ("Stock settings loaded.`n Please reboot your computer")
|
$Messageboxbody = ("Stock settings loaded.`n Please reboot your computer")
|
||||||
|
$MessageIcon = [System.Windows.MessageBoxImage]::Information
|
||||||
|
|
||||||
$MEssageIcon = [System.Windows.MessageBoxImage]::Information
|
[System.Windows.MessageBox]::Show($Messageboxbody,$MessageboxTitle,$ButtonType,$MessageIcon)
|
||||||
|
|
||||||
[System.Windows.MessageBox]::Show($Messageboxbody,$MessageboxTitle,$ButtonType,$messageicon)
|
|
||||||
})
|
})
|
||||||
$WPFUpdatesdisable.Add_Click({
|
$WPFUpdatesdisable.Add_Click({
|
||||||
# Source: https://github.com/rgl/windows-vagrant/blob/master/disable-windows-updates.ps1
|
# Source: https://github.com/rgl/windows-vagrant/blob/master/disable-windows-updates.ps1
|
||||||
@ -1717,12 +1717,13 @@ $WPFUpdatessecurity.Add_Click({
|
|||||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "BranchReadinessLevel" -Type DWord -Value 20
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "BranchReadinessLevel" -Type DWord -Value 20
|
||||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "DeferFeatureUpdatesPeriodInDays" -Type DWord -Value 365
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "DeferFeatureUpdatesPeriodInDays" -Type DWord -Value 365
|
||||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "DeferQualityUpdatesPeriodInDays " -Type DWord -Value 4
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "DeferQualityUpdatesPeriodInDays " -Type DWord -Value 4
|
||||||
|
|
||||||
|
$ButtonType = [System.Windows.MessageBoxButton]::OK
|
||||||
$MessageboxTitle = "Set Security Updates"
|
$MessageboxTitle = "Set Security Updates"
|
||||||
$Messageboxbody = ("Recommended Update settings loaded")
|
$Messageboxbody = ("Recommended Update settings loaded")
|
||||||
|
$MessageIcon = [System.Windows.MessageBoxImage]::Information
|
||||||
|
|
||||||
$MEssageIcon = [System.Windows.MessageBoxImage]::Information
|
[System.Windows.MessageBox]::Show($Messageboxbody,$MessageboxTitle,$ButtonType,$MessageIcon)
|
||||||
|
|
||||||
[System.Windows.MessageBox]::Show($Messageboxbody,$MessageboxTitle,$ButtonType,$messageicon)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
#===========================================================================
|
#===========================================================================
|
||||||
|
Loading…
Reference in New Issue
Block a user