@@ -4,19 +4,32 @@ description: Applies some Revision configurations
44privilege : TrustedInstaller
55actions :
66
7+ # Disable transparency and animations for low end devices
8+ - !powerShell:
9+ runas : currentUserElevated
10+ command : |
11+ $mem = (Get-CimInstance Win32_PhysicalMemory | Measure-Object Capacity -Sum).Sum
12+ if ($mem -lt 9000000000) {
13+ [microsoft.win32.registry]::SetValue('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize', 'EnableTransparency', 0, [Microsoft.Win32.RegistryValueKind]::DWord)
14+ [microsoft.win32.registry]::SetValue('HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics', 'MinAnimate', 0, [Microsoft.Win32.RegistryValueKind]::DWord)
15+ }
16+
717 # Disable Memory Compression
818 - !powerShell:
919 command : ' Disable-MMAgent -mc'
1020
21+ - !registryValue: {path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Services\Pending\7971f918-a847-4430-9279-4a52d1efe18d', value: 'RegisterWithAU', type: REG_DWORD, data: '0'}
22+
23+ # [!] Breaks 'defrag c: -b'
1124 # Disable Superfetch for SSDs
12- # Might not work on VMs
13- - !powerShell:
14- command : |
15- $mediaType = (Get-PhysicalDisk -SerialNumber (Get-Disk -Number (Get-Partition -DriveLetter $env:SystemDrive.Substring(0, 1)).DiskNumber).SerialNumber.TrimStart()).MediaType
16- if ($mediaType -eq 'SSD') {
17- $path = ${env:ProgramFiles(x86)} + '\Revision Tool\data\flutter_assets\additionals\DisableSF.bat'
18- Start-Process -FilePath $path -Wait -NoNewWindow
19- }
25+ # Detection of mediaType might not work on VMs
26+ # - !powerShell:
27+ # command: |
28+ # $mediaType = (Get-PhysicalDisk -SerialNumber (Get-Disk -Number (Get-Partition -DriveLetter $env:SystemDrive.Substring(0, 1)).DiskNumber).SerialNumber.TrimStart()).MediaType
29+ # if ($mediaType -eq 'SSD') {
30+ # $path = ${env:ProgramFiles(x86)} + '\Revision Tool\data\flutter_assets\additionals\DisableSF.bat'
31+ # Start-Process -FilePath $path -Wait -NoNewWindow
32+ # }
2033
2134 - !cmd:
2235 command : ' setx DOTNET_CLI_TELEMETRY_OPTOUT 1'
@@ -35,13 +48,9 @@ actions:
3548
3649 - !writeStatus: {status: "Finalizing process"}
3750 - !registryValue: {path: 'HKCU\System\GameConfigStore', value: 'GameDVR_FSEBehaviorMode', type: REG_DWORD, data: '0', weight: 70}
38- - !registryValue: {path: 'HKCU\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications', value: 'GlobalUserDisabled', type: REG_DWORD, data: '1', weight: 60}
3951
4052 - !powerShell: {command: 'Get-ScheduledTask -TaskPath "\Microsoft\Office\*" | Disable-ScheduledTask'}
4153
42- # OneDrive workaround
43- - !registryValue: {path: 'HKLM\Software\Policies\Microsoft\Windows\OneDrive', value: 'DisableFileSyncNGSC', operation: delete}
44-
4554 - !run:
4655 exeDir : true
4756 exe : " PowerShell"
@@ -59,7 +68,7 @@ actions:
5968 - !run:
6069 exeDir : true
6170 exe : " FILEASSOC.cmd"
62- option : " configure-lpv "
71+ option : " remove-appx-photos "
6372 weight : 150
6473
6574 - !cmd:
@@ -79,26 +88,31 @@ actions:
7988 exeDir : true
8089 runas : currentUserElevated
8190 option : " configure-wallpaper"
82- weight : 45
91+ weight : 45
8392
84- - !writeStatus: {status: "Configuring features"}
85- - !run:
86- exeDir : true
87- exe : " PowerShell"
88- args : ' -NoP -ExecutionPolicy Bypass -File DISM-FEATURES.ps1'
89- weight : 270
90-
91- # Necessary to refresh start menu entries etc.
93+ # Necessary to refresh start menu entries etc.
9294 - !appx: {operation: clearCache, name: '*Client.CBS*'}
9395 - !appx: {operation: clearCache, name: '*StartMenuExperienceHost*', option: "remove-pinned-items-startmenu"}
9496 - !appx: {operation: clearCache, name: '*Windows.Search*'}
9597 - !appx: {operation: clearCache, name: '*TCUI*'}
96- # Workaround for KGL versions to match
97- - !appx: {operation: clearCache, name: '*XboxGameCallableUI*'}
98- - !appx: {operation: clearCache, name: '*XboxGameOverlay*'}
99- - !appx: {operation: clearCache, name: '*XboxGamingOverlay*'}
100- - !appx: {operation: clearCache, name: '*XboxIdentityProvider*'}
101- - !appx: {operation: clearCache, name: '*XboxSpeechToTextOverlay*'}
102-
103- # Start as user process to prevent weird look due to running as TrustedInstaller
104- # - !run: {baseDir: true, exe: "NSudoLC.exe", args: '-U:C -UseCurrentConsole explorer.exe'}
98+
99+ # Force update group policy
100+ - !run:
101+ exe : " gpupdate.exe"
102+
103+ # Apply micro patches via Revision Tool in order to avoid new playbook releases for minor changes
104+ - !run:
105+ path : " %ProgramFiles(x86)%\\ Revision Tool"
106+ exe : " revitool.exe"
107+ args : " playbook-patches apply"
108+ wait : true
109+ runas : currentUserElevated
110+
111+ - !powerShell:
112+ command : |
113+ $explorerProcess = Get-Process -Name explorer -ErrorAction SilentlyContinue
114+ if ($explorerProcess) {
115+ Stop-Process -Name explorer -Force
116+ }
117+ Start-Process explorer
118+ runas : currentUserElevated
0 commit comments