From 7240f1a975b02a7c68856daba446f727927547dc Mon Sep 17 00:00:00 2001 From: Xyueta Date: Fri, 6 Oct 2023 17:25:35 +0200 Subject: [PATCH] feat: use error code (1) --- src/playbook/Configuration/atlas/start.yml | 4 ++-- src/playbook/Executables/WIN11.cmd | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/playbook/Configuration/atlas/start.yml b/src/playbook/Configuration/atlas/start.yml index 2718d44220..7c1e530530 100644 --- a/src/playbook/Configuration/atlas/start.yml +++ b/src/playbook/Configuration/atlas/start.yml @@ -3,14 +3,14 @@ title: Initial Configuration description: Copies Atlas folders/files, installs dependencies and performs the preliminary configuration privilege: TrustedInstaller actions: - # AME Wizard Live Log for development Playbooks + # AME Wizard Live Log for development playbooks # Do not change the line position of this, otherwise things will break # - !run: {exe: 'cmd.exe', args: '/c start "AME Wizard Live Log" PowerShell -NoP -C "gc -Wait Logs\TIOutput.txt -EA SilentlyContinue | Write-Output; pause"', baseDir: true, wait: false} # Prevent annoying notifications during deployment - !registryValue: {path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\Windows.SystemToast.SecurityAndMaintenance', value: 'Enabled', type: REG_DWORD, data: '0'} - # Prevent computer from going to sleep + # Prevent computer from going to sleep during deployment - !run: {exe: 'powercfg.exe', args: '/setacvalueindex scheme_current sub_sleep standbyidle 0'} - !run: {exe: 'powercfg.exe', args: '/setdcvalueindex scheme_current sub_sleep standbyidle 0'} diff --git a/src/playbook/Executables/WIN11.cmd b/src/playbook/Executables/WIN11.cmd index 29b93e1757..53601fc153 100644 --- a/src/playbook/Executables/WIN11.cmd +++ b/src/playbook/Executables/WIN11.cmd @@ -139,7 +139,7 @@ reg add "HKU\%~1\Control Panel\Quick Actions\Control Center\QuickActionsStateCap :: Remove 'Bitmap File' from 'New' context menu set "mrtCache=HKEY_USERS\%~1\Software\Classes\Local Settings\MrtCache" echo %~1 | find "_Classes" > nul -if errorlevel 0 ( +if errorlevel 1 ( for /f "tokens=*" %%a in ('reg query "%mrtCache%" /s ^| find /i "%mrtCache%"') do ( for /f "tokens=1-2" %%b in ('reg query "%%a" /v * ^| find /i "ShellNewDisplayName_Bmp"') do ( reg add "%%a" /v "%%b %%c" /t REG_SZ /d "" /f