diff --git a/src/Configuration/features/base/config.yml b/src/Configuration/features/base/config.yml index 4fdd12e..06797a1 100644 --- a/src/Configuration/features/base/config.yml +++ b/src/Configuration/features/base/config.yml @@ -1,6 +1,12 @@ title: Configuration privilege: TrustedInstaller actions: + # Sync time and set to more reliable time servers + - !service: {name: "w32time", operation: start, ignoreErrors: true} + - !run: {exe: 'w32tm', args: '/config /syncfromflags:manual /manualpeerlist:"0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org"'} + - !run: {exe: 'w32tm', args: '/config /update'} + - !run: {exe: 'w32tm', args: '/resync'} + - !writeStatus: {status: 'Cleaning user interface'} - !service: name: "WpnService" diff --git a/src/Configuration/features/base/regedits.yml b/src/Configuration/features/base/regedits.yml index 2e664dc..7dca46a 100644 --- a/src/Configuration/features/base/regedits.yml +++ b/src/Configuration/features/base/regedits.yml @@ -293,6 +293,12 @@ actions: # Turns off Windows blocking installation of files downloaded from the internet - !registryValue: {path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Attachments', value: 'SaveZoneInformation', type: REG_DWORD, data: '1'} + # Hide 'Chat' icon from Settings + - !registryValue: {path: 'HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Chat', value: 'ChatIcon', type: REG_DWORD, data: '3'} + + # Disable opening GameBar when pressing the XBOX button on an XBOX controller + - !registryValue: {path: 'HKCU\Software\Microsoft\GameBar', value: 'UseNexusForGameBarEnabled', type: REG_DWORD, data: '0'} + # Disables SmartScreen - !registryValue: {path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost', value: 'ContentEvaluation', type: REG_DWORD, data: '0'} diff --git a/src/Executables/UGC.bat b/src/Executables/UGC.bat index 4c521a8..62301aa 100644 --- a/src/Executables/UGC.bat +++ b/src/Executables/UGC.bat @@ -89,6 +89,7 @@ reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\UGC-%RNDStr%" reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\UGC-%RNDStr%" /v "NoRepair" /t REG_DWORD /d "1" /f PowerShell -NoP -C "$Content = (Get-Content '%ProgramData%\chocolatey\lib\ungoogled-chromium\tools\chocolateyUninstall.ps1'); $Content = $Content -replace '', 'Start-Process ''%ProgramData%\chocolatey\tools\ugc_uninstaller.exe'' -Verb RunAs -ArgumentList ''%RNDStr%'',''Choco'' -Wait -ErrorAction Continue' | Set-Content '%ProgramData%\chocolatey\lib\ungoogled-chromium\tools\chocolateyUninstall.ps1'" +PowerShell -NoP -EP Unrestricted -File "UGCWIDEVINE.ps1" @echo off diff --git a/src/Executables/UGCWIDEVINE.ps1 b/src/Executables/UGCWIDEVINE.ps1 new file mode 100644 index 0000000..61326e9 --- /dev/null +++ b/src/Executables/UGCWIDEVINE.ps1 @@ -0,0 +1,23 @@ +# https://chromium.woolyss.com/#widevine + +$ErrorActionPreference = 'Stop' +$ProgressPreference = 'SilentlyContinue' + +# make temp directories +$rootTemp = Join-Path -Path $env:TEMP -ChildPath $([System.IO.Path]::GetRandomFileName()) +New-Item $rootTemp -ItemType Directory -Force | Out-Null + +# get latest version and download it +$latestVersion = (Invoke-RestMethod "https://dl.google.com/widevine-cdm/versions.txt" -UseBasicParsing) -split "`n" | ? {$_.Trim() -ne "" } | Select-Object -Last 1 +Invoke-WebRequest "https://dl.google.com/widevine-cdm/$latestVersion-win-x64.zip" -OutFile "$rootTemp\widevine-ugc.zip" -UseBasicParsing +# extract to temp +Expand-Archive "$rootTemp\widevine-ugc.zip" -DestinationPath $rootTemp -Force + +# copy to UGC +foreach ($user in $(Get-ChildItem "$env:SystemDrive\Users" -Force -Directory -Exclude "All Users", "Default User", "Public")) { + $widevinePath = "$user\AppData\Local\Chromium\User Data\WidevineCdm\_platform_specific" + + New-Item @("$widevinePath\..", "$widevinePath") -Force -ItemType Directory + Copy-Item "$rootTemp\*" -Destination $widevinePath -Recurse -Force -Include "*.dll*" + Copy-Item "$rootTemp\*" -Destination "$widevinePath\.." -Recurse -Force -Exclude "*.zip", "*.dll*" +} \ No newline at end of file