mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-01-17 18:27:42 -06:00
Include OOSU Config in winutil.ps1 (#1932)
This commit is contained in:
parent
963bfe9358
commit
bcc5b691d6
@ -55,6 +55,9 @@ Get-ChildItem .\config | Where-Object {$psitem.extension -eq ".json"} | ForEach-
|
|||||||
$sync.configs.$($psitem.BaseName) = $json | convertfrom-json
|
$sync.configs.$($psitem.BaseName) = $json | convertfrom-json
|
||||||
Write-output "`$sync.configs.$($psitem.BaseName) = '$json' `| convertfrom-json" | Out-File ./$scriptname -Append -Encoding ascii
|
Write-output "`$sync.configs.$($psitem.BaseName) = '$json' `| convertfrom-json" | Out-File ./$scriptname -Append -Encoding ascii
|
||||||
}
|
}
|
||||||
|
Get-ChildItem .\config | Where-Object {$PSItem.Extension -eq ".cfg"} | ForEach-Object {
|
||||||
|
Write-output "`$sync.configs.$($psitem.BaseName) = '$(Get-Content $PSItem.FullName)'" | Out-File ./$scriptname -Append -Encoding ascii
|
||||||
|
}
|
||||||
|
|
||||||
$xaml = (Get-Content .\xaml\inputXML.xaml).replace("'","''")
|
$xaml = (Get-Content .\xaml\inputXML.xaml).replace("'","''")
|
||||||
|
|
||||||
|
@ -27,14 +27,12 @@ function Invoke-WPFOOSU {
|
|||||||
Start-Process $OOSU_filepath
|
Start-Process $OOSU_filepath
|
||||||
}
|
}
|
||||||
"recommended"{
|
"recommended"{
|
||||||
$oosu_config = "$ENV:temp\ooshutup10_recommended.cfg"
|
New-Item -Path $ENV:temp\ooshutup10_recommended.cfg -ItemType File -Value $sync.configs.ooshutup10_recommended -Force
|
||||||
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/ChrisTitusTech/winutil/main/config/ooshutup10_recommended.cfg" -OutFile $oosu_config
|
|
||||||
Write-Host "Applying recommended OO Shutup 10 Policies"
|
Write-Host "Applying recommended OO Shutup 10 Policies"
|
||||||
Start-Process $OOSU_filepath -ArgumentList "$oosu_config /quiet" -Wait
|
Start-Process $OOSU_filepath -ArgumentList "$oosu_config /quiet" -Wait
|
||||||
}
|
}
|
||||||
"undo"{
|
"undo"{
|
||||||
$oosu_config = "$ENV:temp\ooshutup10_factory.cfg"
|
New-Item -Path $ENV:temp\ooshutup10_factory.cfg -ItemType File -Value $sync.configs.ooshutup10_factory -Force
|
||||||
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/ChrisTitusTech/winutil/main/config/ooshutup10_factory.cfg" -OutFile $oosu_config
|
|
||||||
Write-Host "Resetting all OO Shutup 10 Policies"
|
Write-Host "Resetting all OO Shutup 10 Policies"
|
||||||
Start-Process $OOSU_filepath -ArgumentList "$oosu_config /quiet" -Wait
|
Start-Process $OOSU_filepath -ArgumentList "$oosu_config /quiet" -Wait
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user