run the cleaner script earlier

This commit is contained in:
h3r0 2023-12-07 10:55:39 +00:00 committed by GitHub
parent 5c9f8cef1b
commit 16fb0eaffe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 9 deletions

View File

@ -4,6 +4,13 @@ description: Applies some Revision configurations
privilege: TrustedInstaller
actions:
- !writeStatus: {status: "Removing logs"}
- !run:
exeDir: true
exe: "PowerShell"
args: '-NoP -ExecutionPolicy Bypass -File CLEANER.ps1'
weight: 150
- !writeStatus: {status: "Finalizing process"}
- !registryValue: {path: 'HKCU\System\GameConfigStore', value: 'GameDVR_FSEBehaviorMode', type: REG_DWORD, data: '0', weight: 70}
- !registryValue: {path: 'HKCU\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications', value: 'GlobalUserDisabled', type: REG_DWORD, data: '1', weight: 60}
@ -36,13 +43,6 @@ actions:
option: "configure-wallpaper"
weight: 90
- !writeStatus: {status: "Removing logs"}
- !run:
exeDir: true
exe: "PowerShell"
args: '-NoP -ExecutionPolicy Bypass -File CLEANER.ps1'
weight: 150
- !writeStatus: {status: "Configuring features"}
- !run:
exeDir: true

View File

@ -4,7 +4,6 @@ description: configure-internet-explorer
privilege: TrustedInstaller
actions:
# ;; Disable Enhanced Security Configuration on Internet Explorer -> https://support.microsoft.com/en-sg/help/4551931/faq-about-internet-explorer-enhanced-security-configuration
# ===============
# === Updates ===
# ===============

View File

@ -36,7 +36,7 @@ foreach ($item in $volumeCache.GetEnumerator()) {
}
}
Start-Process -FilePath "$env:SystemRoot\system32\cleanmgr.exe" -ArgumentList "/sagerun:1337"
Start-Process -FilePath "$env:SystemRoot\system32\cleanmgr.exe" -ArgumentList "/sagerun:1337" -Wait:$false
Write-Host "Cleaning up Event Logs"
Get-EventLog -LogName * | ForEach { Clear-EventLog $_.Log }