mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-06-27 16:44:46 -05:00
Remove oosu essential tweak (#2099)
* Compile Winutil * Remove the Essential OO Tweak Checkbox, Rename the OO Button and simplify the OO Script * Remove The Entire 'Adding: Config *.cfg' Compilation Process --------- Co-authored-by: Marterich <Marterich@users.noreply.github.com> Co-authored-by: Mr.k <mineshtine28546271@gmail.com>
This commit is contained in:
@ -26,7 +26,7 @@ function Invoke-WPFButton {
|
||||
"WPFclear" {Invoke-WPFPresets -preset $null -imported $true}
|
||||
"WPFclearWinget" {Invoke-WPFPresets -preset $null -imported $true -CheckBox "WPFInstall"}
|
||||
"WPFtweaksbutton" {Invoke-WPFtweaksbutton}
|
||||
"WPFOOSUbutton" {Invoke-WPFOOSU -action "customize"}
|
||||
"WPFOOSUbutton" {Invoke-WPFOOSU}
|
||||
"WPFAddUltPerf" {Invoke-WPFUltimatePerformance -State "Enabled"}
|
||||
"WPFRemoveUltPerf" {Invoke-WPFUltimatePerformance -State "Disabled"}
|
||||
"WPFundoall" {Invoke-WPFundoall}
|
||||
|
@ -1,43 +1,20 @@
|
||||
function Invoke-WPFOOSU {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Downloads and runs OO Shutup 10 with or without config files
|
||||
.PARAMETER action
|
||||
Specifies how OOSU should be started
|
||||
customize: Opens the OOSU GUI
|
||||
recommended: Loads and applies the recommended OOSU policies silently
|
||||
undo: Resets all policies to factory silently
|
||||
Downloads and runs OO Shutup 10
|
||||
#>
|
||||
|
||||
param (
|
||||
[ValidateSet("customize", "recommended", "undo")]
|
||||
[string]$action
|
||||
)
|
||||
|
||||
$OOSU_filepath = "$ENV:temp\OOSU10.exe"
|
||||
|
||||
$Initial_ProgressPreference = $ProgressPreference
|
||||
$ProgressPreference = "SilentlyContinue" # Disables the Progress Bar to drasticly speed up Invoke-WebRequest
|
||||
Invoke-WebRequest -Uri "https://dl5.oo-software.com/files/ooshutup10/OOSU10.exe" -OutFile $OOSU_filepath
|
||||
|
||||
switch ($action)
|
||||
{
|
||||
"customize"{
|
||||
Write-Host "Starting OO Shutup 10 ..."
|
||||
Start-Process $OOSU_filepath
|
||||
}
|
||||
"recommended"{
|
||||
$oosu_config = "$ENV:temp\ooshutup10_recommended.cfg"
|
||||
$sync.configs.ooshutup10_recommended | Out-File -FilePath $oosu_config -Force
|
||||
Write-Host "Applying recommended OO Shutup 10 Policies"
|
||||
Start-Process $OOSU_filepath -ArgumentList "$oosu_config /quiet" -Wait
|
||||
}
|
||||
"undo"{
|
||||
$oosu_config = "$ENV:temp\ooshutup10_factory.cfg"
|
||||
$sync.configs.ooshutup10_factory | Out-File -FilePath $oosu_config -Force
|
||||
Write-Host "Resetting all OO Shutup 10 Policies"
|
||||
Start-Process $OOSU_filepath -ArgumentList "$oosu_config /quiet" -Wait
|
||||
}
|
||||
try {
|
||||
$OOSU_filepath = "$ENV:temp\OOSU10.exe"
|
||||
$Initial_ProgressPreference = $ProgressPreference
|
||||
$ProgressPreference = "SilentlyContinue" # Disables the Progress Bar to drasticly speed up Invoke-WebRequest
|
||||
Invoke-WebRequest -Uri "https://dl5.oo-software.com/files/ooshutup10/OOSU10.exe" -OutFile $OOSU_filepath
|
||||
Write-Host "Starting OO Shutup 10 ..."
|
||||
Start-Process $OOSU_filepath
|
||||
}
|
||||
$ProgressPreference = $Initial_ProgressPreference
|
||||
}
|
||||
catch {
|
||||
Write-Host "Error Downloading and Running OO Shutup 10" -ForegroundColor Red
|
||||
}
|
||||
finally {
|
||||
$ProgressPreference = $Initial_ProgressPreference
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user