Browse Source

feat: general improvements

- Hide 'Chat' from Settings
- Disable opening GameBar when pressing XBOX button
- Sync time and set to more reliable time servers
- Add Widevine DRM to UGC
master
he3als 7 months ago
parent
commit
aaa16b5428
Signed by: he3als GPG Key ID: A0FC52EA5368ECF4
4 changed files with 36 additions and 0 deletions
  1. +6
    -0
      src/Configuration/features/base/config.yml
  2. +6
    -0
      src/Configuration/features/base/regedits.yml
  3. +1
    -0
      src/Executables/UGC.bat
  4. +23
    -0
      src/Executables/UGCWIDEVINE.ps1

+ 6
- 0
src/Configuration/features/base/config.yml View File

@ -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"


+ 6
- 0
src/Configuration/features/base/regedits.yml View File

@ -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'}


+ 1
- 0
src/Executables/UGC.bat View File

@ -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 '<Command>', '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


+ 23
- 0
src/Executables/UGCWIDEVINE.ps1 View File

@ -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*"
}

Loading…
Cancel
Save