diff --git a/Compile.ps1 b/Compile.ps1 index 330c226a..2f568499 100644 --- a/Compile.ps1 +++ b/Compile.ps1 @@ -55,6 +55,9 @@ Get-ChildItem .\config | Where-Object {$psitem.extension -eq ".json"} | ForEach- $sync.configs.$($psitem.BaseName) = $json | convertfrom-json 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("'","''") diff --git a/functions/public/Invoke-WPFOOSU b/functions/public/Invoke-WPFOOSU index d30ea3a8..d244acf2 100644 --- a/functions/public/Invoke-WPFOOSU +++ b/functions/public/Invoke-WPFOOSU @@ -27,14 +27,12 @@ function Invoke-WPFOOSU { Start-Process $OOSU_filepath } "recommended"{ - $oosu_config = "$ENV:temp\ooshutup10_recommended.cfg" - Invoke-WebRequest -Uri "https://raw.githubusercontent.com/ChrisTitusTech/winutil/main/config/ooshutup10_recommended.cfg" -OutFile $oosu_config + New-Item -Path $ENV:temp\ooshutup10_recommended.cfg -ItemType File -Value $sync.configs.ooshutup10_recommended -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" - Invoke-WebRequest -Uri "https://raw.githubusercontent.com/ChrisTitusTech/winutil/main/config/ooshutup10_factory.cfg" -OutFile $oosu_config + New-Item -Path $ENV:temp\ooshutup10_factory.cfg -ItemType File -Value $sync.configs.ooshutup10_factory -Force Write-Host "Resetting all OO Shutup 10 Policies" Start-Process $OOSU_filepath -ArgumentList "$oosu_config /quiet" -Wait }