From 7d4350e27e63a635a4512c6bfa5343726179b08e Mon Sep 17 00:00:00 2001 From: Xyueta Date: Sat, 7 Oct 2023 22:12:12 +0200 Subject: [PATCH] feat: restructure env variables/localexpansion in batch scripts --- .../Disable Animations (default).cmd | 1 - .../Animations/Enable Animations.cmd | 1 - .../Bluetooth/Disable Bluetooth.cmd | 3 +- .../Bluetooth/Enable Bluetooth.cmd | 5 +-- .../Disable Lanman Workstation.cmd | 1 - .../Enable Lanman Workstation (default).cmd | 1 - .../Disable Network Discovery Services.cmd | 1 - ...e Network Discovery Services (default).cmd | 1 - .../Notifications/Disable Notifications.cmd | 1 - .../Enable Notifications (default).cmd | 1 - .../Power/CPU Idle/Disable Idle.cmd | 1 - .../Power/CPU Idle/Enable Idle (default).cmd | 1 - .../Disable Hibernation (default).cmd | 1 - .../Power/Hibernation/Enable Hibernation.cmd | 1 - .../Power Saving/Disable Power Saving.cmd | 5 +-- .../Power Saving/Enable Power Saving.cmd | 1 - .../Printing/Disable Printing (default).cmd | 1 - .../Printing/Enable Printing.cmd | 1 - .../Disable Search Indexing (default).cmd | 1 - .../Enable Search Indexing.cmd | 1 - .../Disable Start Menu and Search.cmd | 19 ++++----- .../Enable Start Menu and Search.cmd | 5 +-- .../Start Menu/Install Open-Shell.cmd | 23 +++++------ .../VPN/Disable VPN support.cmd | 1 - .../VPN/Enable VPN support (default).cmd | 1 - .../3. Configuration/Wi-Fi/Disable Wi-Fi.cmd | 1 - .../Wi-Fi/Enable Wi-Fi (default).cmd | 1 - .../Debloat Send To Context Menu.cmd | 13 +++--- .../Appearance/Boot Logo.cmd | 3 +- .../Appearance/Boot Messages.cmd | 3 +- .../Appearance/New Boot Menu.cmd | 3 +- .../Appearance/Spinning Animation.cmd | 3 +- .../Always Go to Advanced Boot Options.cmd | 3 +- .../Behavior/Automatic Repair.cmd | 3 +- .../Editing Kernel Parameters on Startup.cmd | 3 +- .../Behavior/Highest Mode.cmd | 3 +- .../View Current Values.cmd | 1 - .../DSCP/Add Game to DSCP Policy.cmd | 1 - .../Disable Container Context Menu.cmd | 1 - .../Enable Container Context Menu.cmd | 1 - .../Disable NVIDIA Display Container LS.cmd | 1 - .../Enable NVIDIA Display Container LS.cmd | 1 - .../Static IP/Automatically Set Static IP.cmd | 41 +++++++++---------- .../Static IP/Revert Static IP.cmd | 7 ++-- .../Install Process Explorer.cmd | 11 +++-- .../Uninstall Process Explorer.cmd | 3 +- .../7. Security/Defender/Toggle Defender.cmd | 2 +- .../Firewall/Disable Windows Firewall.cmd | 1 - .../Enable Windows Firewall (Default).cmd | 1 - .../Mitigations/Disable All Mitigations.cmd | 4 +- .../Mitigations/Enable All Mitigations.cmd | 4 +- .../Set Windows Default Mitigations.cmd | 1 - .../Disable UAC.cmd | 5 +-- .../Enable UAC (default).cmd | 3 +- .../Reset Network to Atlas Default.cmd | 9 ++-- .../Reset Network to Windows Default.cmd | 1 - .../Safe Mode/Exit Safe Mode.cmd | 1 - .../Safe Mode with Command Prompt.cmd | 1 - .../Safe Mode/Safe Mode with Networking.cmd | 1 - .../Safe Mode/Safe Mode.cmd | 1 - .../Disable Troubleshooting (default).cmd | 3 +- .../Service/Enable Troubleshooting.cmd | 1 - .../AtlasModules/Scripts/RunAsTI.cmd | 5 +-- .../AtlasModules/Scripts/online-sxs.cmd | 2 +- .../AtlasModules/Scripts/setSvc.cmd | 3 +- .../AtlasModules/Scripts/toggleDev.cmd | 13 +++--- src/playbook/Executables/CONVERTUSERS.cmd | 9 ++-- src/playbook/Executables/FINALIZE.cmd | 22 +++++----- src/playbook/Executables/ONED.cmd | 1 - src/playbook/Executables/PFP.cmd | 31 +++++++------- src/playbook/Executables/WIN11.cmd | 1 - 71 files changed, 123 insertions(+), 189 deletions(-) diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Animations/Disable Animations (default).cmd b/src/playbook/Executables/AtlasDesktop/3. Configuration/Animations/Disable Animations (default).cmd index 1a2d9e2220..e54c5e4fb8 100644 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Animations/Disable Animations (default).cmd +++ b/src/playbook/Executables/AtlasDesktop/3. Configuration/Animations/Disable Animations (default).cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( call RunAsTI.cmd "%~f0" %* diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Animations/Enable Animations.cmd b/src/playbook/Executables/AtlasDesktop/3. Configuration/Animations/Enable Animations.cmd index 773b0bbe09..f6de044596 100644 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Animations/Enable Animations.cmd +++ b/src/playbook/Executables/AtlasDesktop/3. Configuration/Animations/Enable Animations.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( call RunAsTI.cmd "%~f0" %* diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Bluetooth/Disable Bluetooth.cmd b/src/playbook/Executables/AtlasDesktop/3. Configuration/Bluetooth/Disable Bluetooth.cmd index cdf91fedf9..4c745fbd48 100644 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Bluetooth/Disable Bluetooth.cmd +++ b/src/playbook/Executables/AtlasDesktop/3. Configuration/Bluetooth/Disable Bluetooth.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion if "%~1"=="/silent" goto main @@ -36,7 +35,7 @@ call setSvc.cmd BthPan 4 > nul 2>&1 :: Disable Bluetooth devices call %windir%\AtlasModules\Scripts\toggleDev.cmd -Silent '*Bluetooth*' -attrib +h "!APPDATA!\Microsoft\Windows\SendTo\Bluetooth File Transfer.LNK" +attrib +h "%APPDATA%\Microsoft\Windows\SendTo\Bluetooth File Transfer.LNK" :: https://learn.microsoft.com/en-us/windows/client-management/mdm/policy-csp-connectivity reg add "HKLM\SOFTWARE\Microsoft\PolicyManager\default\Connectivity\AllowBluetooth" /v "value" /t REG_DWORD /d "0" /f > nul diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Bluetooth/Enable Bluetooth.cmd b/src/playbook/Executables/AtlasDesktop/3. Configuration/Bluetooth/Enable Bluetooth.cmd index 670eb065fc..f7b3f3c139 100644 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Bluetooth/Enable Bluetooth.cmd +++ b/src/playbook/Executables/AtlasDesktop/3. Configuration/Bluetooth/Enable Bluetooth.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( call RunAsTI.cmd "%~f0" %* @@ -37,8 +36,8 @@ call toggleDev.cmd -Silent -Enable '*Bluetooth*' reg add "HKLM\SOFTWARE\Microsoft\PolicyManager\default\Connectivity\AllowBluetooth" /v "value" /t REG_DWORD /d "2" /f > nul choice /c:yn /n /m "Would you like to enable the 'Bluetooth File Transfer' Send To context menu entry? [Y/N] " -if !errorlevel! == 1 attrib -h "!APPDATA!\Microsoft\Windows\SendTo\Bluetooth File Transfer.LNK" -if !errorlevel! == 2 attrib +h "!APPDATA!\Microsoft\Windows\SendTo\Bluetooth File Transfer.LNK" +if %errorlevel% == 1 attrib -h "%APPDATA%\Microsoft\Windows\SendTo\Bluetooth File Transfer.LNK" +if %errorlevel% == 2 attrib +h "%APPDATA%\Microsoft\Windows\SendTo\Bluetooth File Transfer.LNK" echo Finished, please reboot your device for changes to apply. pause diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Lanman Workstation (SMB)/Disable Lanman Workstation.cmd b/src/playbook/Executables/AtlasDesktop/3. Configuration/Lanman Workstation (SMB)/Disable Lanman Workstation.cmd index 0afd54f5af..5d3e5cbbf2 100644 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Lanman Workstation (SMB)/Disable Lanman Workstation.cmd +++ b/src/playbook/Executables/AtlasDesktop/3. Configuration/Lanman Workstation (SMB)/Disable Lanman Workstation.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( call RunAsTI.cmd "%~f0" %* diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Lanman Workstation (SMB)/Enable Lanman Workstation (default).cmd b/src/playbook/Executables/AtlasDesktop/3. Configuration/Lanman Workstation (SMB)/Enable Lanman Workstation (default).cmd index eaa26c2e25..954f42e1dd 100644 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Lanman Workstation (SMB)/Enable Lanman Workstation (default).cmd +++ b/src/playbook/Executables/AtlasDesktop/3. Configuration/Lanman Workstation (SMB)/Enable Lanman Workstation (default).cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion if "%~1"=="/silent" goto main diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Network Discovery/Disable Network Discovery Services.cmd b/src/playbook/Executables/AtlasDesktop/3. Configuration/Network Discovery/Disable Network Discovery Services.cmd index e7fda3d715..05c72981a2 100644 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Network Discovery/Disable Network Discovery Services.cmd +++ b/src/playbook/Executables/AtlasDesktop/3. Configuration/Network Discovery/Disable Network Discovery Services.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( call RunAsTI.cmd "%~f0" %* diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Network Discovery/Enable Network Discovery Services (default).cmd b/src/playbook/Executables/AtlasDesktop/3. Configuration/Network Discovery/Enable Network Discovery Services (default).cmd index d7c979dc8f..d9e3d3a091 100644 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Network Discovery/Enable Network Discovery Services (default).cmd +++ b/src/playbook/Executables/AtlasDesktop/3. Configuration/Network Discovery/Enable Network Discovery Services (default).cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion if "%~1"=="/silent" goto main diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Notifications/Disable Notifications.cmd b/src/playbook/Executables/AtlasDesktop/3. Configuration/Notifications/Disable Notifications.cmd index 4aed982d4a..790de32b4c 100644 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Notifications/Disable Notifications.cmd +++ b/src/playbook/Executables/AtlasDesktop/3. Configuration/Notifications/Disable Notifications.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( call RunAsTI.cmd "%~f0" %* diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Notifications/Enable Notifications (default).cmd b/src/playbook/Executables/AtlasDesktop/3. Configuration/Notifications/Enable Notifications (default).cmd index dfb44a96bf..869db7928b 100644 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Notifications/Enable Notifications (default).cmd +++ b/src/playbook/Executables/AtlasDesktop/3. Configuration/Notifications/Enable Notifications (default).cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( call RunAsTI.cmd "%~f0" %* diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/CPU Idle/Disable Idle.cmd b/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/CPU Idle/Disable Idle.cmd index 00741b43f6..270ad832cd 100644 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/CPU Idle/Disable Idle.cmd +++ b/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/CPU Idle/Disable Idle.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion :: Check if hyper threading is enabled for /f "tokens=2 delims==" %%a in ('wmic cpu get NumberOfCores /value') do set PHYSICAL_CORES=%%a diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/CPU Idle/Enable Idle (default).cmd b/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/CPU Idle/Enable Idle (default).cmd index 1d71a764e7..8b600c0e02 100644 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/CPU Idle/Enable Idle (default).cmd +++ b/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/CPU Idle/Enable Idle (default).cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion powercfg /setacvalueindex scheme_current sub_processor 5d76a2ca-e8c0-402f-a133-2158492d58ad 0 powercfg /setactive scheme_current diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/Hibernation/Disable Hibernation (default).cmd b/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/Hibernation/Disable Hibernation (default).cmd index ab4c028264..f8a3f13828 100644 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/Hibernation/Disable Hibernation (default).cmd +++ b/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/Hibernation/Disable Hibernation (default).cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion if "%~1"=="/setup" goto main diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/Hibernation/Enable Hibernation.cmd b/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/Hibernation/Enable Hibernation.cmd index 3068713d98..7c45f5e4d8 100644 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/Hibernation/Enable Hibernation.cmd +++ b/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/Hibernation/Enable Hibernation.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( call RunAsTI.cmd "%~f0" %* diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/Power Saving/Disable Power Saving.cmd b/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/Power Saving/Disable Power Saving.cmd index 2791b3d332..933d14ff3f 100644 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/Power Saving/Disable Power Saving.cmd +++ b/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/Power Saving/Disable Power Saving.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion if "%~1"=="/setup" goto main @@ -11,9 +10,9 @@ whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( :: Detect if user uses laptop device or personal computer for /f "delims=:{}" %%a in ('wmic path Win32_SystemEnclosure get ChassisTypes ^| findstr [0-9]') do set "CHASSIS=%%a" set "DEVICE_TYPE=PC" -for %%a in (8 9 10 11 12 13 14 18 21 30 31 32) do if "!CHASSIS!" == "%%a" (set "DEVICE_TYPE=LAPTOP") +for %%a in (8 9 10 11 12 13 14 18 21 30 31 32) do if "%CHASSIS%" == "%%a" (set "DEVICE_TYPE=LAPTOP") -if "!DEVICE_TYPE!"=="LAPTOP" ( +if "%DEVICE_TYPE%"=="LAPTOP" ( echo WARNING: You are on a laptop, disabling power saving features will cause faster battery drainage and increased heat output. echo If you use your laptop on battery, certain power saving features will enable, but not all. echo It's NOT recommended to disable power saving on laptops in general. diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/Power Saving/Enable Power Saving.cmd b/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/Power Saving/Enable Power Saving.cmd index 8b744d1340..905bebaff0 100644 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/Power Saving/Enable Power Saving.cmd +++ b/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/Power Saving/Enable Power Saving.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( call RunAsTI.cmd "%~f0" %* diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Printing/Disable Printing (default).cmd b/src/playbook/Executables/AtlasDesktop/3. Configuration/Printing/Disable Printing (default).cmd index 52c1611721..da53a83a97 100644 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Printing/Disable Printing (default).cmd +++ b/src/playbook/Executables/AtlasDesktop/3. Configuration/Printing/Disable Printing (default).cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion if "%~1"=="/silent" goto main diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Printing/Enable Printing.cmd b/src/playbook/Executables/AtlasDesktop/3. Configuration/Printing/Enable Printing.cmd index 22a9be4a4f..e4e1f18ff0 100644 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Printing/Enable Printing.cmd +++ b/src/playbook/Executables/AtlasDesktop/3. Configuration/Printing/Enable Printing.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( call RunAsTI.cmd "%~f0" %* diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Search Indexing/Disable Search Indexing (default).cmd b/src/playbook/Executables/AtlasDesktop/3. Configuration/Search Indexing/Disable Search Indexing (default).cmd index 6d7b14bb38..5dd19499be 100644 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Search Indexing/Disable Search Indexing (default).cmd +++ b/src/playbook/Executables/AtlasDesktop/3. Configuration/Search Indexing/Disable Search Indexing (default).cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( call RunAsTI.cmd "%~f0" %* diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Search Indexing/Enable Search Indexing.cmd b/src/playbook/Executables/AtlasDesktop/3. Configuration/Search Indexing/Enable Search Indexing.cmd index a3d63586c3..2c1da3a469 100644 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Search Indexing/Enable Search Indexing.cmd +++ b/src/playbook/Executables/AtlasDesktop/3. Configuration/Search Indexing/Enable Search Indexing.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( call RunAsTI.cmd "%~f0" %* diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Start Menu/Disable Start Menu and Search.cmd b/src/playbook/Executables/AtlasDesktop/3. Configuration/Start Menu/Disable Start Menu and Search.cmd index f16ba41caa..23cab5c39c 100644 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Start Menu/Disable Start Menu and Search.cmd +++ b/src/playbook/Executables/AtlasDesktop/3. Configuration/Start Menu/Disable Start Menu and Search.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion if "%~1"=="/silent" goto main @@ -8,8 +7,8 @@ whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( exit /b ) -if exist "!windir!\SystemApps\Microsoft.Windows.Search_cw5n1h2txyewy\SearchApp.exe" goto existS -if exist "!windir!\SystemApps\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy\StartMenuExperienceHost.exe" goto existS +if exist "%windir%\SystemApps\Microsoft.Windows.Search_cw5n1h2txyewy\SearchApp.exe" goto existS +if exist "%windir%\SystemApps\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy\StartMenuExperienceHost.exe" goto existS :existS if exist "%ProgramFiles%\Open-Shell" goto main @@ -19,27 +18,27 @@ pause :main set /P c="This will disable SearchApp and StartMenuExperienceHost, are you sure you want to continue [Y/N]? " -if /I "!c!" == "Y" goto continSS -if /I "!c!" == "N" exit /b -if /I "!c!" == "" echo No option selected - launch the script again. & pause & exit /b 1 +if /I "%c%" == "Y" goto continSS +if /I "%c%" == "N" exit /b +if /I "%c%" == "" echo No option selected - launch the script again. & pause & exit /b 1 :continSS -cd !windir!\SystemApps\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy +cd %windir%\SystemApps\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy taskkill /f /im StartMenuExperienceHost* > nul 2>&1 ren StartMenuExperienceHost.exe StartMenuExperienceHost.exee > nul 2>&1 :: Loop if it fails to rename the first time -if exist "!windir!\SystemApps\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy\StartMenuExperienceHost.exe" goto restartStart +if exist "%windir%\SystemApps\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy\StartMenuExperienceHost.exe" goto restartStart :restartSearch -cd !windir!\SystemApps\Microsoft.Windows.Search_cw5n1h2txyewy +cd %windir%\SystemApps\Microsoft.Windows.Search_cw5n1h2txyewy taskkill /f /im SearchApp* > nul 2>&1 ren SearchApp.exe SearchApp.exee > nul 2>&1 :: Loop if it fails to rename the first time -if exist "!windir!\SystemApps\Microsoft.Windows.Search_cw5n1h2txyewy\SearchApp.exe" goto restartSearch +if exist "%windir%\SystemApps\Microsoft.Windows.Search_cw5n1h2txyewy\SearchApp.exe" goto restartSearch :: Search icon reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "SearchboxTaskbarMode" /t REG_DWORD /d "0" /f > nul diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Start Menu/Enable Start Menu and Search.cmd b/src/playbook/Executables/AtlasDesktop/3. Configuration/Start Menu/Enable Start Menu and Search.cmd index 22a5977fa4..a450d1ae33 100644 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Start Menu/Enable Start Menu and Search.cmd +++ b/src/playbook/Executables/AtlasDesktop/3. Configuration/Start Menu/Enable Start Menu and Search.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( call RunAsTI.cmd "%~f0" %* @@ -7,11 +6,11 @@ whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( ) :: Rename start menu -cd !windir!\SystemApps\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy +cd %windir%\SystemApps\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy ren StartMenuExperienceHost.exee StartMenuExperienceHost.exe :: Rename search -cd !windir!\SystemApps\Microsoft.Windows.Search_cw5n1h2txyewy +cd %windir%\SystemApps\Microsoft.Windows.Search_cw5n1h2txyewy ren SearchApp.exee SearchApp.exe :: Search icon diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Start Menu/Install Open-Shell.cmd b/src/playbook/Executables/AtlasDesktop/3. Configuration/Start Menu/Install Open-Shell.cmd index a7d3b046bf..71e10b5e4d 100644 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Start Menu/Install Open-Shell.cmd +++ b/src/playbook/Executables/AtlasDesktop/3. Configuration/Start Menu/Install Open-Shell.cmd @@ -1,7 +1,6 @@ @echo off -setlocal EnableDelayedExpansion -fltmc >nul 2>&1 || ( +fltmc > nul 2>&1 || ( echo Administrator privileges are required. PowerShell Start -Verb RunAs '%0' 2> nul || ( echo You must run this script as admin. @@ -11,7 +10,7 @@ fltmc >nul 2>&1 || ( ) ping -n 1 -4 www.example.com | find "time=" > nul 2>&1 -if !errorlevel! == 1 ( +if %errorlevel% == 1 ( echo You must have an internet connection to use this script. pause exit /b 1 @@ -23,14 +22,14 @@ where winget > nul 2>&1 || ( exit /b 1 ) -if exist "!windir!\SystemApps\Microsoft.Windows.Search_cw5n1h2txyewy\SearchApp.exe" goto existOS -if exist "!windir!\SystemApps\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy\StartMenuExperienceHost.exe" goto existOS +if exist "%windir%\SystemApps\Microsoft.Windows.Search_cw5n1h2txyewy\SearchApp.exe" goto existOS +if exist "%windir%\SystemApps\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy\StartMenuExperienceHost.exe" goto existOS goto skipRM :existOS cls & set /P c="It appears search and start are installed, would you like to disable them also? [Y/N]? " -if /I "!c!" == "Y" goto rmSSOS -if /I "!c!" == "N" goto skipRM +if /I "%c%" == "Y" goto rmSSOS +if /I "%c%" == "N" goto skipRM :rmSSOS call "%windir%\AtlasDesktop\3. Configuration\Start Menu\Disable Start Menu and Search.cmd" /silent @@ -40,7 +39,7 @@ echo] :: Download and install Open-Shell winget install -e --id Open-Shell.Open-Shell-Menu -h --accept-source-agreements --accept-package-agreements --force > nul -if !errorlevel! NEQ 0 ( +if %errorlevel% NEQ 0 ( echo eror: Open-Shell installation failed. pause exit /b 1 @@ -48,13 +47,13 @@ if !errorlevel! NEQ 0 ( :: Download Fluent Metro theme for /f "delims=" %%a in ('PowerShell "(Invoke-RestMethod -Uri "https://api.github.com/repos/bonzibudd/Fluent-Metro/releases/latest").assets.browser_download_url"') do ( - curl -L --output !TEMP!\skin.zip %%a + curl -L --output %TEMP%\skin.zip %%a ) -PowerShell -NoP -C "Expand-Archive '!TEMP!\skin.zip' -DestinationPath '$env:ProgramFiles\Open-Shell\Skins'" +PowerShell -NoP -C "Expand-Archive '%TEMP%\skin.zip' -DestinationPath '$env:ProgramFiles\Open-Shell\Skins'" -del /f /q !TEMP!\Open-Shell.exe > nul 2>&1 -del /f /q !TEMP!\skin.zip > nul 2>&1 +del /f /q %TEMP%\Open-Shell.exe > nul 2>&1 +del /f /q %TEMP%\skin.zip > nul 2>&1 taskkill /f /im explorer.exe > nul 2>&1 start explorer.exe diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/VPN/Disable VPN support.cmd b/src/playbook/Executables/AtlasDesktop/3. Configuration/VPN/Disable VPN support.cmd index ebd58517ef..8f71556bfb 100644 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/VPN/Disable VPN support.cmd +++ b/src/playbook/Executables/AtlasDesktop/3. Configuration/VPN/Disable VPN support.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( call RunAsTI.cmd "%~f0" %* diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/VPN/Enable VPN support (default).cmd b/src/playbook/Executables/AtlasDesktop/3. Configuration/VPN/Enable VPN support (default).cmd index b173aa2bbc..92bff5585c 100644 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/VPN/Enable VPN support (default).cmd +++ b/src/playbook/Executables/AtlasDesktop/3. Configuration/VPN/Enable VPN support (default).cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( call RunAsTI.cmd "%~f0" %* diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Wi-Fi/Disable Wi-Fi.cmd b/src/playbook/Executables/AtlasDesktop/3. Configuration/Wi-Fi/Disable Wi-Fi.cmd index 0088da6ca3..5ad38066bf 100644 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Wi-Fi/Disable Wi-Fi.cmd +++ b/src/playbook/Executables/AtlasDesktop/3. Configuration/Wi-Fi/Disable Wi-Fi.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( call RunAsTI.cmd "%~f0" %* diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Wi-Fi/Enable Wi-Fi (default).cmd b/src/playbook/Executables/AtlasDesktop/3. Configuration/Wi-Fi/Enable Wi-Fi (default).cmd index abb3b03419..f258e18118 100644 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Wi-Fi/Enable Wi-Fi (default).cmd +++ b/src/playbook/Executables/AtlasDesktop/3. Configuration/Wi-Fi/Enable Wi-Fi (default).cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( call RunAsTI.cmd "%~f0" %* diff --git a/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Send To Context Menu/Debloat Send To Context Menu.cmd b/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Send To Context Menu/Debloat Send To Context Menu.cmd index aa4439fa2c..9715f8a2b3 100644 --- a/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Send To Context Menu/Debloat Send To Context Menu.cmd +++ b/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Send To Context Menu/Debloat Send To Context Menu.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( call RunAsTI.cmd "%~f0" %* @@ -27,12 +26,12 @@ for %%a in ("%items:;=" "%") do ( if "%%~a" == "Documents" (set documents=true) if "%%~a" == "Removable Drives" (set removableDrives=true) ) -if "!bluetooth!" == "true" (attrib +h "!APPDATA!\Microsoft\Windows\SendTo\Bluetooth File Transfer.LNK") else (attrib -h "!APPDATA!\Microsoft\Windows\SendTo\Bluetooth File Transfer.LNK") -if "!zipfolder!" == "true" (attrib +h "!APPDATA!\Microsoft\Windows\SendTo\Compressed (zipped) Folder.ZFSendToTarget") else (attrib -h "!APPDATA!\Microsoft\Windows\SendTo\Compressed (zipped) Folder.ZFSendToTarget") -if "!desktop!" == "true" (attrib +h "!APPDATA!\Microsoft\Windows\SendTo\Desktop (create shortcut).DeskLink") else (attrib -h "!APPDATA!\Microsoft\Windows\SendTo\Desktop (create shortcut).DeskLink") -if "!mail!" == "true" (attrib +h "!APPDATA!\Microsoft\Windows\SendTo\Mail Recipient.MAPIMail") else (attrib -h "!APPDATA!\Microsoft\Windows\SendTo\Mail Recipient.MAPIMail") -if "!documents!" == "true" (attrib +h "!APPDATA!\Microsoft\Windows\SendTo\Documents.mydocs") else (attrib -h "!APPDATA!\Microsoft\Windows\SendTo\Documents.mydocs") -if "!removableDrive!" == "true" ( +if "%bluetooth%" == "true" (attrib +h "%APPDATA%\Microsoft\Windows\SendTo\Bluetooth File Transfer.LNK") else (attrib -h "%APPDATA%\Microsoft\Windows\SendTo\Bluetooth File Transfer.LNK") +if "%zipfolder%" == "true" (attrib +h "%APPDATA%\Microsoft\Windows\SendTo\Compressed (zipped) Folder.ZFSendToTarget") else (attrib -h "%APPDATA%\Microsoft\Windows\SendTo\Compressed (zipped) Folder.ZFSendToTarget") +if "%desktop%" == "true" (attrib +h "%APPDATA%\Microsoft\Windows\SendTo\Desktop (create shortcut).DeskLink") else (attrib -h "%APPDATA%\Microsoft\Windows\SendTo\Desktop (create shortcut).DeskLink") +if "%mail%" == "true" (attrib +h "%APPDATA%\Microsoft\Windows\SendTo\Mail Recipient.MAPIMail") else (attrib -h "%APPDATA%\Microsoft\Windows\SendTo\Mail Recipient.MAPIMail") +if "%documents%" == "true" (attrib +h "%APPDATA%\Microsoft\Windows\SendTo\Documents.mydocs") else (attrib -h "%APPDATA%\Microsoft\Windows\SendTo\Documents.mydocs") +if "%removableDrive%" == "true" ( reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoDrivesInSendToMenu" /t REG_DWORD /d "1" /f > nul 2>&1 ) else ( reg delete "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoDrivesInSendToMenu" /f > nul 2>&1 diff --git a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Boot Configuration/Appearance/Boot Logo.cmd b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Boot Configuration/Appearance/Boot Logo.cmd index eeb058caab..928784ca71 100644 --- a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Boot Configuration/Appearance/Boot Logo.cmd +++ b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Boot Configuration/Appearance/Boot Logo.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( call RunAsTI.cmd "%~f0" %* @@ -13,7 +12,7 @@ echo [1] Disable the boot logo echo [2] Enable the boot logo (default) echo] choice /c 12 /n /m "Type 1 or 2: " -if !errorlevel! == 1 ( +if %errorlevel% == 1 ( goto disable ) else ( goto enable diff --git a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Boot Configuration/Appearance/Boot Messages.cmd b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Boot Configuration/Appearance/Boot Messages.cmd index 6273832d66..046136480c 100644 --- a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Boot Configuration/Appearance/Boot Messages.cmd +++ b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Boot Configuration/Appearance/Boot Messages.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( call RunAsTI.cmd "%~f0" %* @@ -16,7 +15,7 @@ echo [1] Disable boot messages echo [2] Enable boot messages (default) echo] choice /c 12 /n /m "Type 1 or 2: " -if !errorlevel! == 1 ( +if %errorlevel% == 1 ( goto disable ) else ( goto enable diff --git a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Boot Configuration/Appearance/New Boot Menu.cmd b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Boot Configuration/Appearance/New Boot Menu.cmd index 1a8742421e..7ae475e0d2 100644 --- a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Boot Configuration/Appearance/New Boot Menu.cmd +++ b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Boot Configuration/Appearance/New Boot Menu.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( call RunAsTI.cmd "%~f0" %* @@ -16,7 +15,7 @@ echo [1] Disable the new boot menu (default) echo [2] Enable the new boot menu echo] choice /c 12 /n /m "Type 1 or 2: " -if !errorlevel! == 1 ( +if %errorlevel% == 1 ( goto disable ) else ( goto enable diff --git a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Boot Configuration/Appearance/Spinning Animation.cmd b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Boot Configuration/Appearance/Spinning Animation.cmd index 836bde51e7..01c5a05792 100644 --- a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Boot Configuration/Appearance/Spinning Animation.cmd +++ b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Boot Configuration/Appearance/Spinning Animation.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( call RunAsTI.cmd "%~f0" %* @@ -12,7 +11,7 @@ echo [1] Disable the spinning animation echo [2] Enable the spinning animation (default) echo] choice /c 12 /n /m "Type 1 or 2: " -if !errorlevel! == 1 ( +if %errorlevel% == 1 ( goto disable ) else ( goto enable diff --git a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Boot Configuration/Behavior/Always Go to Advanced Boot Options.cmd b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Boot Configuration/Behavior/Always Go to Advanced Boot Options.cmd index 7396f5fe54..08822575ff 100644 --- a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Boot Configuration/Behavior/Always Go to Advanced Boot Options.cmd +++ b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Boot Configuration/Behavior/Always Go to Advanced Boot Options.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( call RunAsTI.cmd "%~f0" %* @@ -15,7 +14,7 @@ echo [1] Disable always going to the advanced boot options (default) echo [2] Enable always going to the advanced boot options echo] choice /c 12 /n /m "Type 1 or 2: " -if !errorlevel! == 1 ( +if %errorlevel% == 1 ( goto disable ) else ( goto enable diff --git a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Boot Configuration/Behavior/Automatic Repair.cmd b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Boot Configuration/Behavior/Automatic Repair.cmd index 42d74c72da..ef23daa1aa 100644 --- a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Boot Configuration/Behavior/Automatic Repair.cmd +++ b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Boot Configuration/Behavior/Automatic Repair.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( call RunAsTI.cmd "%~f0" %* @@ -15,7 +14,7 @@ echo [1] Disable automatic repair echo [2] Enable automatic repair (default) echo] choice /c 12 /n /m "Type 1 or 2: " -if !errorlevel! == 1 ( +if %errorlevel% == 1 ( goto disable ) else ( goto enable diff --git a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Boot Configuration/Behavior/Editing Kernel Parameters on Startup.cmd b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Boot Configuration/Behavior/Editing Kernel Parameters on Startup.cmd index 42e3fc3ad8..4b44d5c168 100644 --- a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Boot Configuration/Behavior/Editing Kernel Parameters on Startup.cmd +++ b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Boot Configuration/Behavior/Editing Kernel Parameters on Startup.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( call RunAsTI.cmd "%~f0" %* @@ -15,7 +14,7 @@ echo [1] Disable editing of kernel parameters on startup (default) echo [2] Enable editing of kernel parameters on startup echo] choice /c 12 /n /m "Type 1 or 2: " -if !errorlevel! == 1 ( +if %errorlevel% == 1 ( goto disable ) else ( goto enable diff --git a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Boot Configuration/Behavior/Highest Mode.cmd b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Boot Configuration/Behavior/Highest Mode.cmd index 97e8c01861..f261535758 100644 --- a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Boot Configuration/Behavior/Highest Mode.cmd +++ b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Boot Configuration/Behavior/Highest Mode.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( call RunAsTI.cmd "%~f0" %* @@ -16,7 +15,7 @@ echo [1] Disable (default) echo [2] Enable echo] choice /c 12 /n /m "Type 1 or 2: " -if !errorlevel! == 1 ( +if %errorlevel% == 1 ( goto disable ) else ( goto enable diff --git a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Boot Configuration/View Current Values.cmd b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Boot Configuration/View Current Values.cmd index 061b9cb48f..28a89b6fe4 100644 --- a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Boot Configuration/View Current Values.cmd +++ b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Boot Configuration/View Current Values.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( call RunAsTI.cmd "%~f0" %* diff --git a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/DSCP/Add Game to DSCP Policy.cmd b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/DSCP/Add Game to DSCP Policy.cmd index 6cf2f52025..0a0d303583 100644 --- a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/DSCP/Add Game to DSCP Policy.cmd +++ b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/DSCP/Add Game to DSCP Policy.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( call RunAsTI.cmd "%~f0" %* diff --git a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/NVIDIA Display Container/Context Menu/Disable Container Context Menu.cmd b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/NVIDIA Display Container/Context Menu/Disable Container Context Menu.cmd index 0b519d18bd..6a9bcc2308 100644 --- a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/NVIDIA Display Container/Context Menu/Disable Container Context Menu.cmd +++ b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/NVIDIA Display Container/Context Menu/Disable Container Context Menu.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( call RunAsTI.cmd "%~f0" %* diff --git a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/NVIDIA Display Container/Context Menu/Enable Container Context Menu.cmd b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/NVIDIA Display Container/Context Menu/Enable Container Context Menu.cmd index b98511388f..558e1f6f25 100644 --- a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/NVIDIA Display Container/Context Menu/Enable Container Context Menu.cmd +++ b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/NVIDIA Display Container/Context Menu/Enable Container Context Menu.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( call RunAsTI.cmd "%~f0" %* diff --git a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/NVIDIA Display Container/Disable NVIDIA Display Container LS.cmd b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/NVIDIA Display Container/Disable NVIDIA Display Container LS.cmd index 354e8d7bde..7963e68a80 100644 --- a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/NVIDIA Display Container/Disable NVIDIA Display Container LS.cmd +++ b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/NVIDIA Display Container/Disable NVIDIA Display Container LS.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( call RunAsTI.cmd "%~f0" %* diff --git a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/NVIDIA Display Container/Enable NVIDIA Display Container LS.cmd b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/NVIDIA Display Container/Enable NVIDIA Display Container LS.cmd index e002209f4d..561e058dd7 100644 --- a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/NVIDIA Display Container/Enable NVIDIA Display Container LS.cmd +++ b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/NVIDIA Display Container/Enable NVIDIA Display Container LS.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( call RunAsTI.cmd "%~f0" %* diff --git a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Static IP/Automatically Set Static IP.cmd b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Static IP/Automatically Set Static IP.cmd index ea0ba071d1..376818d7e7 100644 --- a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Static IP/Automatically Set Static IP.cmd +++ b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Static IP/Automatically Set Static IP.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( call RunAsTI.cmd "%~f0" %* @@ -7,7 +6,7 @@ whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( ) ping -n 1 -4 www.example.com | find "time=" > nul 2>&1 -if !errorlevel! == 1 ( +if %errorlevel% == 1 ( echo You must have an internet connection to use this script. pause exit /b 1 @@ -16,37 +15,37 @@ if !errorlevel! == 1 ( set /P DNS1="Set primary DNS Server (e.g. 1.1.1.1): " set /P DNS2="Set alternate DNS Server (e.g. 1.0.0.1): " for /f "tokens=4" %%a in ('netsh int show interface ^| find "Connected"') do set DeviceName=%%a -for /f "tokens=3" %%a in ('netsh int ip show config name^="!DeviceName!" ^| findstr "IP Address:"') do set LocalIP=%%a -for /f "tokens=3" %%a in ('netsh int ip show config name^="!DeviceName!" ^| findstr "Default Gateway:"') do set DHCPGateway=%%a -for /f "tokens=2 delims=()" %%a in ('netsh int ip show config name^="!DeviceName!" ^| findstr /r "(.*)"') do for %%i in (%%a) do set DHCPSubnetMask=%%i +for /f "tokens=3" %%a in ('netsh int ip show config name^="%DeviceName%" ^| findstr "IP Address:"') do set LocalIP=%%a +for /f "tokens=3" %%a in ('netsh int ip show config name^="%DeviceName%" ^| findstr "Default Gateway:"') do set DHCPGateway=%%a +for /f "tokens=2 delims=()" %%a in ('netsh int ip show config name^="%DeviceName%" ^| findstr /r "(.*)"') do for %%i in (%%a) do set DHCPSubnetMask=%%i :: Check for errors and exit if invalid cls -if "!DeviceName!" == "" set incorrectIP=1 -call:isValidIP !LocalIP! -call:isValidIP !DHCPGateway! -call:isValidIP !DHCPSubnetMask! -call:isValidIP !DNS1! -call:isValidIP !DNS2! +if "%DeviceName%" == "" set incorrectIP=1 +call:isValidIP %LocalIP% +call:isValidIP %DHCPGateway% +call:isValidIP %DHCPSubnetMask% +call:isValidIP %DNS1% +call:isValidIP %DNS2% -if !incorrectIP! == 1 ( +if %incorrectIP% == 1 ( echo Setting a Static IP address failed. pause exit /b 1 ) :: Set Static IP -netsh int ipv4 set address name="!DeviceName!" static !LocalIP! !DHCPSubnetMask! !DHCPGateway! > nul 2>&1 -netsh int ipv4 set dns name="!DeviceName!" static !DNS1! primary > nul 2>&1 -netsh int ipv4 add dns name="!DeviceName!" !DNS2! index=2 > nul 2>&1 +netsh int ipv4 set address name="%DeviceName%" static %LocalIP% %DHCPSubnetMask% %DHCPGateway% > nul 2>&1 +netsh int ipv4 set dns name="%DeviceName%" static %DNS1% primary > nul 2>&1 +netsh int ipv4 add dns name="%DeviceName%" %DNS2% index=2 > nul 2>&1 :: Display details about the connection -echo Interface: !DeviceName! -echo Private IP: !LocalIP! -echo Subnet Mask: !DHCPSubnetMask%! -echo Gateway: !DHCPGateway! -echo Primary DNS: !DNS1! -echo Alternate DNS: !DNS2! +echo Interface: %DeviceName% +echo Private IP: %LocalIP% +echo Subnet Mask: %DHCPSubnetMask%% +echo Gateway: %DHCPGateway% +echo Primary DNS: %DNS1% +echo Alternate DNS: %DNS2% echo. echo If this information appears to be incorrect or is blank, please report it on Discord or Github. diff --git a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Static IP/Revert Static IP.cmd b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Static IP/Revert Static IP.cmd index 8d6538c06b..8a41d05c23 100644 --- a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Static IP/Revert Static IP.cmd +++ b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Static IP/Revert Static IP.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( call RunAsTI.cmd "%~f0" %* @@ -9,9 +8,9 @@ whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( for /f "tokens=4" %%a in ('netsh int show interface ^| find "Connected"') do set DeviceName=%%a :: Set DHCP instead of Static IP -netsh int ipv4 set address name="!DeviceName!" dhcp -netsh int ipv4 set dnsservers name="!DeviceName!" dhcp -netsh int ipv4 show config "!DeviceName!" +netsh int ipv4 set address name="%DeviceName%" dhcp +netsh int ipv4 set dnsservers name="%DeviceName%" dhcp +netsh int ipv4 show config "%DeviceName%" :: Enable DHCP service call setSvc.cmd Dhcp 2 diff --git a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Utilities/Process Explorer/Install Process Explorer.cmd b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Utilities/Process Explorer/Install Process Explorer.cmd index 7182a0b497..304f70c75d 100644 --- a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Utilities/Process Explorer/Install Process Explorer.cmd +++ b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Utilities/Process Explorer/Install Process Explorer.cmd @@ -1,7 +1,6 @@ @echo off -setlocal EnableDelayedExpansion -fltmc >nul 2>&1 || ( +fltmc > nul 2>&1 || ( echo Administrator privileges are required. PowerShell Start -Verb RunAs '%0' 2> nul || ( echo You must run this script as admin. @@ -11,7 +10,7 @@ fltmc >nul 2>&1 || ( ) ping -n 1 -4 www.example.com | find "time=" > nul 2>&1 -if !errorlevel! == 1 ( +if %errorlevel% == 1 ( echo You must have an internet connection to use this script. pause exit /b 1 @@ -25,8 +24,8 @@ where winget > nul 2>&1 || ( echo Installing Process Explorer... winget install -e --id Microsoft.Sysinternals.ProcessExplorer --uninstall-previous -l "%windir%\AtlasModules\Apps\ProcessExplorer" -h --accept-source-agreements --accept-package-agreements --force --disable-interactivity > nul -if !errorlevel! NEQ 0 ( - echo Error: Process Explorer installation failed. +if %errorlevel% NEQ 0 ( + echo error: Process Explorer installation failed. pause exit /b 1 ) @@ -34,7 +33,7 @@ if !errorlevel! NEQ 0 ( echo Creating the Start menu shortcut... PowerShell -NoP -C "$WshShell = New-Object -comObject WScript.Shell; $Shortcut = $WshShell.CreateShortcut("""$env:ProgramData\Microsoft\Windows\Start Menu\Programs\Process Explorer.lnk"""); $Shortcut.TargetPath = """$env:windir\AtlasModules\Apps\ProcessExplorer\procexp.exe"""; $Shortcut.Save()" > nul if not errorlevel 0 ( - echo Process Explorer shortcut could not be created in the start menu^^! + echo Process Explorer shortcut could not be created in the start menu! ) echo Configuring Process Explorer... diff --git a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Utilities/Process Explorer/Uninstall Process Explorer.cmd b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Utilities/Process Explorer/Uninstall Process Explorer.cmd index 98114a9675..74aaf3e708 100644 --- a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Utilities/Process Explorer/Uninstall Process Explorer.cmd +++ b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Utilities/Process Explorer/Uninstall Process Explorer.cmd @@ -1,7 +1,6 @@ @echo off -setlocal EnableDelayedExpansion -fltmc >nul 2>&1 || ( +fltmc > nul 2>&1 || ( echo Administrator privileges are required. PowerShell Start -Verb RunAs '%0' 2> nul || ( echo You must run this script as admin. diff --git a/src/playbook/Executables/AtlasDesktop/7. Security/Defender/Toggle Defender.cmd b/src/playbook/Executables/AtlasDesktop/7. Security/Defender/Toggle Defender.cmd index 65f9cbbcd2..47b78e9677 100644 --- a/src/playbook/Executables/AtlasDesktop/7. Security/Defender/Toggle Defender.cmd +++ b/src/playbook/Executables/AtlasDesktop/7. Security/Defender/Toggle Defender.cmd @@ -9,7 +9,7 @@ exit /b :main if "%*"=="" ( - fltmc >nul 2>&1 || ( + fltmc > nul 2>&1 || ( echo Administrator privileges are required. PowerShell Start -Verb RunAs '%0' 2> nul || ( echo You must run this script as admin. diff --git a/src/playbook/Executables/AtlasDesktop/7. Security/Firewall/Disable Windows Firewall.cmd b/src/playbook/Executables/AtlasDesktop/7. Security/Firewall/Disable Windows Firewall.cmd index 05ddbeb51b..f74265baac 100644 --- a/src/playbook/Executables/AtlasDesktop/7. Security/Firewall/Disable Windows Firewall.cmd +++ b/src/playbook/Executables/AtlasDesktop/7. Security/Firewall/Disable Windows Firewall.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( call RunAsTI.cmd "%~f0" %* diff --git a/src/playbook/Executables/AtlasDesktop/7. Security/Firewall/Enable Windows Firewall (Default).cmd b/src/playbook/Executables/AtlasDesktop/7. Security/Firewall/Enable Windows Firewall (Default).cmd index fc84aa823e..64235bd360 100644 --- a/src/playbook/Executables/AtlasDesktop/7. Security/Firewall/Enable Windows Firewall (Default).cmd +++ b/src/playbook/Executables/AtlasDesktop/7. Security/Firewall/Enable Windows Firewall (Default).cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( call RunAsTI.cmd "%~f0" %* diff --git a/src/playbook/Executables/AtlasDesktop/7. Security/Mitigations/Disable All Mitigations.cmd b/src/playbook/Executables/AtlasDesktop/7. Security/Mitigations/Disable All Mitigations.cmd index b2ec879772..ba1a60ad88 100644 --- a/src/playbook/Executables/AtlasDesktop/7. Security/Mitigations/Disable All Mitigations.cmd +++ b/src/playbook/Executables/AtlasDesktop/7. Security/Mitigations/Disable All Mitigations.cmd @@ -42,8 +42,8 @@ PowerShell -NoP -C "foreach ($a in $($env:enableCFGApps -split ' ')) {Set-Proces bcdedit /set nx OptIn > nul :: Apply mask to kernel -reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel" /v "MitigationAuditOptions" /t REG_BINARY /d "!mitigation_mask!" /f > nul -reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel" /v "MitigationOptions" /t REG_BINARY /d "!mitigation_mask!" /f > nul +reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel" /v "MitigationAuditOptions" /t REG_BINARY /d "%mitigation_mask%" /f > nul +reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel" /v "MitigationOptions" /t REG_BINARY /d "%mitigation_mask%" /f > nul :: Disable file system mitigations reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager" /v "ProtectionMode" /t REG_DWORD /d "0" /f > nul diff --git a/src/playbook/Executables/AtlasDesktop/7. Security/Mitigations/Enable All Mitigations.cmd b/src/playbook/Executables/AtlasDesktop/7. Security/Mitigations/Enable All Mitigations.cmd index 6438824c1a..e6edfd682f 100644 --- a/src/playbook/Executables/AtlasDesktop/7. Security/Mitigations/Enable All Mitigations.cmd +++ b/src/playbook/Executables/AtlasDesktop/7. Security/Mitigations/Enable All Mitigations.cmd @@ -41,8 +41,8 @@ for /l %%a in (0,1,9) do ( ) :: Apply mask to kernel -reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel" /v "MitigationAuditOptions" /t REG_BINARY /d "!mitigation_mask!" /f > nul -reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel" /v "MitigationOptions" /t REG_BINARY /d "!mitigation_mask!" /f > nul +reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel" /v "MitigationAuditOptions" /t REG_BINARY /d "%mitigation_mask%" /f > nul +reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel" /v "MitigationOptions" /t REG_BINARY /d "%mitigation_mask%" /f > nul :: Enable Data Execution Prevention (DEP) always :: https://docs.microsoft.com/en-us/windows/win32/memory/data-execution-prevention diff --git a/src/playbook/Executables/AtlasDesktop/7. Security/Mitigations/Set Windows Default Mitigations.cmd b/src/playbook/Executables/AtlasDesktop/7. Security/Mitigations/Set Windows Default Mitigations.cmd index 17974efffa..6874f97118 100644 --- a/src/playbook/Executables/AtlasDesktop/7. Security/Mitigations/Set Windows Default Mitigations.cmd +++ b/src/playbook/Executables/AtlasDesktop/7. Security/Mitigations/Set Windows Default Mitigations.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( call RunAsTI.cmd "%~f0" %* diff --git a/src/playbook/Executables/AtlasDesktop/7. Security/User Account Control (UAC)/Disable UAC.cmd b/src/playbook/Executables/AtlasDesktop/7. Security/User Account Control (UAC)/Disable UAC.cmd index 81ca5c2ea3..b959253f3a 100644 --- a/src/playbook/Executables/AtlasDesktop/7. Security/User Account Control (UAC)/Disable UAC.cmd +++ b/src/playbook/Executables/AtlasDesktop/7. Security/User Account Control (UAC)/Disable UAC.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( call RunAsTI.cmd "%~f0" %* @@ -13,8 +12,8 @@ echo] echo With UAC disabled, everything runs as admin, and you cannot change that without enabling UAC. echo] choice /c:yn /n /m "Do you want to continue? [Y/N] " -if !errorlevel! == 1 goto uacDconfirm -if !errorlevel! == 2 exit /b +if %errorlevel% == 1 goto uacDconfirm +if %errorlevel% == 2 exit /b :uacDconfirm reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "ConsentPromptBehaviorAdmin" /t REG_DWORD /d "0" /f > nul diff --git a/src/playbook/Executables/AtlasDesktop/7. Security/User Account Control (UAC)/Enable UAC (default).cmd b/src/playbook/Executables/AtlasDesktop/7. Security/User Account Control (UAC)/Enable UAC (default).cmd index 6e734dc2f3..a483381826 100644 --- a/src/playbook/Executables/AtlasDesktop/7. Security/User Account Control (UAC)/Enable UAC (default).cmd +++ b/src/playbook/Executables/AtlasDesktop/7. Security/User Account Control (UAC)/Enable UAC (default).cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion if /i "%~1" == "/uacSettings" goto uacSettings @@ -15,7 +14,7 @@ reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "Ena reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "EnableVirtualization" /t REG_DWORD /d "1" /f > nul choice /c:yn /n /m "Would you like to have UAC not dim your desktop? You can change this in the UAC settings. [Y/N] " -if !errorlevel! == 1 ( +if %errorlevel% == 1 ( reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "PromptOnSecureDesktop" /t REG_DWORD /d "1" /f > nul ) diff --git a/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Network/Reset Network to Atlas Default.cmd b/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Network/Reset Network to Atlas Default.cmd index b991ab8917..bd80b1b2df 100644 --- a/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Network/Reset Network to Atlas Default.cmd +++ b/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Network/Reset Network to Atlas Default.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( call RunAsTI.cmd "%~f0" %* @@ -104,12 +103,12 @@ for %%a in ( "WoWLANS5Support" ) do ( rem Check without '*' - for /f %%b in ('reg query "!netKey!" /v "%%~a" ^| findstr "HKEY"') do ( - reg add "!netKey!" /v "%%~a" /t REG_SZ /d "0" /f > nul + for /f %%b in ('reg query "%netKey%" /v "%%~a" ^| findstr "HKEY"') do ( + reg add "%netKey%" /v "%%~a" /t REG_SZ /d "0" /f > nul ) rem Check with '*' - for /f %%b in ('reg query "!netKey!" /v "*%%~a" ^| findstr "HKEY"') do ( - reg add "!netKey!" /v "*%%~a" /t REG_SZ /d "0" /f > nul + for /f %%b in ('reg query "%netKey%" /v "*%%~a" ^| findstr "HKEY"') do ( + reg add "%netKey%" /v "*%%~a" /t REG_SZ /d "0" /f > nul ) ) diff --git a/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Network/Reset Network to Windows Default.cmd b/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Network/Reset Network to Windows Default.cmd index f66f0a6988..eee1ec859b 100644 --- a/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Network/Reset Network to Windows Default.cmd +++ b/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Network/Reset Network to Windows Default.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( call RunAsTI.cmd "%~f0" %* diff --git a/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Safe Mode/Exit Safe Mode.cmd b/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Safe Mode/Exit Safe Mode.cmd index 83260ea28a..2e37eac616 100644 --- a/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Safe Mode/Exit Safe Mode.cmd +++ b/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Safe Mode/Exit Safe Mode.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( call RunAsTI.cmd "%~f0" %* diff --git a/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Safe Mode/Safe Mode with Command Prompt.cmd b/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Safe Mode/Safe Mode with Command Prompt.cmd index a3a103c6c7..baf0ae8ac3 100644 --- a/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Safe Mode/Safe Mode with Command Prompt.cmd +++ b/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Safe Mode/Safe Mode with Command Prompt.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( call RunAsTI.cmd "%~f0" %* diff --git a/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Safe Mode/Safe Mode with Networking.cmd b/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Safe Mode/Safe Mode with Networking.cmd index 26ca9bebd3..a0996c7c0b 100644 --- a/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Safe Mode/Safe Mode with Networking.cmd +++ b/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Safe Mode/Safe Mode with Networking.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( call RunAsTI.cmd "%~f0" %* diff --git a/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Safe Mode/Safe Mode.cmd b/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Safe Mode/Safe Mode.cmd index 4757fb1af1..e300b88641 100644 --- a/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Safe Mode/Safe Mode.cmd +++ b/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Safe Mode/Safe Mode.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( call RunAsTI.cmd "%~f0" %* diff --git a/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Service/Disable Troubleshooting (default).cmd b/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Service/Disable Troubleshooting (default).cmd index 5317fb4127..f2e7fb7cb1 100644 --- a/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Service/Disable Troubleshooting (default).cmd +++ b/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Service/Disable Troubleshooting (default).cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( call RunAsTI.cmd "%~f0" %* @@ -14,7 +13,7 @@ for %%a in ( ) choice /c:yn /n /m "Would you like to disable Diagnostic Policy Service (DPS)? Note: It breaks Data Usage page in Settings [Y/N] " -if !errorlevel! == 1 call setSvc.cmd DPS 4 +if %errorlevel% == 1 call setSvc.cmd DPS 4 :: Disable DiagLog autologger reg add "HKLM\SYSTEM\CurrentControlSet\Control\WMI\Autologger\DiagLog" /v "Start" /t REG_DWORD /d "0" /f > nul diff --git a/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Service/Enable Troubleshooting.cmd b/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Service/Enable Troubleshooting.cmd index 38b40196c3..a9baf6594e 100644 --- a/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Service/Enable Troubleshooting.cmd +++ b/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Service/Enable Troubleshooting.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( call RunAsTI.cmd "%~f0" %* diff --git a/src/playbook/Executables/AtlasModules/Scripts/RunAsTI.cmd b/src/playbook/Executables/AtlasModules/Scripts/RunAsTI.cmd index c19f6195fe..127b5951e7 100644 --- a/src/playbook/Executables/AtlasModules/Scripts/RunAsTI.cmd +++ b/src/playbook/Executables/AtlasModules/Scripts/RunAsTI.cmd @@ -1,6 +1,5 @@ <# : batch portion @echo off -setlocal EnableDelayedExpansion goto RunAsTI-Elevate @@ -28,14 +27,14 @@ whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( :RunAsTI-Elevate if "%~1" == "" ( set /P program_path="Enter the valid path of the program or drag it here: " - if "!program_path!" == "" ( + if "%program_path%" == "" ( echo error: no input timeout /t 1 > nul cls goto RunAsTI-Elevate ) - call :RunAsTI !program_path! + call :RunAsTI %program_path% exit /b 1 ) diff --git a/src/playbook/Executables/AtlasModules/Scripts/online-sxs.cmd b/src/playbook/Executables/AtlasModules/Scripts/online-sxs.cmd index 6cdc16b40c..83e38bc597 100644 --- a/src/playbook/Executables/AtlasModules/Scripts/online-sxs.cmd +++ b/src/playbook/Executables/AtlasModules/Scripts/online-sxs.cmd @@ -11,7 +11,7 @@ echo Usage = online-sxs.cmd [-Help] [[-Silent] -CabPath ""] exit /b :main -fltmc >nul 2>&1 || ( +fltmc > nul 2>&1 || ( echo Administrator privileges are required. if "%*"=="" ( PowerShell Start -Verb RunAs '%0' 2> nul || goto error diff --git a/src/playbook/Executables/AtlasModules/Scripts/setSvc.cmd b/src/playbook/Executables/AtlasModules/Scripts/setSvc.cmd index f4b5777fba..0ee50e4046 100644 --- a/src/playbook/Executables/AtlasModules/Scripts/setSvc.cmd +++ b/src/playbook/Executables/AtlasModules/Scripts/setSvc.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( call RunAsTI.cmd "%~f0" %* @@ -34,6 +33,6 @@ reg query "HKLM\SYSTEM\CurrentControlSet\Services\%~1" > nul 2>&1 || ( ) reg add "HKLM\SYSTEM\CurrentControlSet\Services\%~1" /v "Start" /t REG_DWORD /d "%~2" /f > nul || ( - echo error: failed to set service %~1 with start value %~2^^! Unknown error. + echo error: failed to set service %~1 with start value %~2! Unknown error. exit /b 1 ) diff --git a/src/playbook/Executables/AtlasModules/Scripts/toggleDev.cmd b/src/playbook/Executables/AtlasModules/Scripts/toggleDev.cmd index 4dcbd86769..0b9f7fa657 100644 --- a/src/playbook/Executables/AtlasModules/Scripts/toggleDev.cmd +++ b/src/playbook/Executables/AtlasModules/Scripts/toggleDev.cmd @@ -13,25 +13,24 @@ If -Enable is not specified, device is disabled - Made by he3als & Xyueta - Below shows how to use it for mass disabling devices in a batch script -setlocal EnableDelayedExpansion for %%a in ( "ACPI Processor Aggregator" "*SmBus*" ) do ( - if defined __devices ( - set "__devices=!__devices!, "%%~a"" + if defined devices ( + set "devices=%devices%, "%%~a"" ) else ( - set "__devices=@("%%~a"" + set "devices=@("%%~a"" ) ) -set "__devices=!__devices!)" -call toggleDev.cmd !__devices! +set "devices=%devices%)" +call toggleDev.cmd %devices% ---------------------------------------------------------------------------- :main -fltmc >nul 2>&1 || ( +fltmc > nul 2>&1 || ( echo Administrator privileges are required. PowerShell Start -Verb RunAs '%0' 2> nul || ( echo You must run this script as admin. diff --git a/src/playbook/Executables/CONVERTUSERS.cmd b/src/playbook/Executables/CONVERTUSERS.cmd index 1405e9da27..5b7191b6fa 100644 --- a/src/playbook/Executables/CONVERTUSERS.cmd +++ b/src/playbook/Executables/CONVERTUSERS.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion :: make passwords never expire net accounts /maxpwage:unlimited > nul @@ -8,7 +7,7 @@ for /f "usebackq delims=" %%a in (`PowerShell -NoP -C "(Get-LocalUser | Where {$ for /f "usebackq delims=" %%a in (`reg query "HKLM\SOFTWARE\Microsoft\IdentityStore\LogonCache\Name2Sid" ^| findstr /i /c:"Name2Sid"`) do reg delete "%%a" /f > nul 2>&1 for /f "usebackq delims=" %%a in (`reg query "HKLM\SOFTWARE\Microsoft\IdentityStore\LogonCache\Sid2Name" ^| findstr /i /c:"Sid2Name"`) do reg delete "%%a" /f > nul 2>&1 -rmdir /q /s "!windir!\System32\config\systemprofile\AppData\Local\Microsoft\Windows\CloudAPCache" > nul 2>&1 +rmdir /q /s "%windir%\System32\config\systemprofile\AppData\Local\Microsoft\Windows\CloudAPCache" > nul 2>&1 exit /b @@ -18,9 +17,9 @@ for /f "usebackq delims=" %%a in (`reg query "HKLM\SAM\SAM\Domains\Account\Users ) for /f "usebackq delims=" %%a in (`PowerShell -NoP -C "(New-Object -ComObject Microsoft.DiskQuota).TranslateLogonNameToSID('%~1')"`) do set "userSID=%%a" -reg add "HKU\!userSID!\SOFTWARE\Microsoft\Windows\CurrentVersion\AccountState" /v "ExplicitLocal" /t REG_DWORD /d "1" /f > nul -reg delete "HKU\!userSID!\SOFTWARE\Microsoft\IdentityCRL" /f > nul 2>&1 -for /f "usebackq delims=" %%a in (`reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\Credential Providers" /s /f "!userSID!" ^| findstr /c:"!userSID!"`) do reg delete "%%a" /f > nul 2>&1 +reg add "HKU\%userSID%\SOFTWARE\Microsoft\Windows\CurrentVersion\AccountState" /v "ExplicitLocal" /t REG_DWORD /d "1" /f > nul +reg delete "HKU\%userSID%\SOFTWARE\Microsoft\IdentityCRL" /f > nul 2>&1 +for /f "usebackq delims=" %%a in (`reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\Credential Providers" /s /f "%userSID%" ^| findstr /c:"%userSID%"`) do reg delete "%%a" /f > nul 2>&1 :: make it so the user isn't locked out net accounts /lockoutthreshold:0 diff --git a/src/playbook/Executables/FINALIZE.cmd b/src/playbook/Executables/FINALIZE.cmd index 2a32fea317..7b2aafcfeb 100644 --- a/src/playbook/Executables/FINALIZE.cmd +++ b/src/playbook/Executables/FINALIZE.cmd @@ -133,12 +133,12 @@ for %%a in ( "WoWLANS5Support" ) do ( rem Check without '*' - for /f %%b in ('reg query "!netKey!" /v "%%~a" 2^>nul ^| findstr "HKEY" 2^>nul') do ( - reg add "!netKey!" /v "%%~a" /t REG_SZ /d "0" /f > nul + for /f %%b in ('reg query "%netKey%" /v "%%~a" 2^>nul ^| findstr "HKEY" 2^>nul') do ( + reg add "%netKey%" /v "%%~a" /t REG_SZ /d "0" /f > nul ) rem Check with '*' - for /f %%b in ('reg query "!netKey!" /v "*%%~a" 2^>nul ^| findstr "HKEY" 2^>nul') do ( - reg add "!netKey!" /v "*%%~a" /t REG_SZ /d "0" /f > nul + for /f %%b in ('reg query "%netKey%" /v "*%%~a" 2^>nul ^| findstr "HKEY" 2^>nul') do ( + reg add "%netKey%" /v "*%%~a" /t REG_SZ /d "0" /f > nul ) ) @@ -147,11 +147,11 @@ for %%a in ( "Documents.mydocs" "Mail Recipient.MAPIMail" ) do ( - attrib +h "!APPDATA!\Microsoft\Windows\SendTo\%%~a" > nul + attrib +h "%APPDATA%\Microsoft\Windows\SendTo\%%~a" > nul ) :: Remove Fax Recipient from the 'Send to' context menu as Fax feature is removed -del /f /q "!APPDATA!\Microsoft\Windows\SendTo\Fax Recipient.lnk" > nul 2>&1 +del /f /q "%APPDATA%\Microsoft\Windows\SendTo\Fax Recipient.lnk" > nul 2>&1 :: Disable audio exclusive mode on all devices for %%a in ("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Capture", "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render") do ( @@ -185,14 +185,14 @@ for /f %%a in ('PowerShell -NoP -C "(Get-PhysicalDisk -SerialNumber (Get-Disk -N set "diskDrive=%%a" ) -if "!diskDrive!" == "SSD" ( +if "%diskDrive%" == "SSD" ( rem Remove lower filters for rdyboost driver set "key=HKLM\SYSTEM\CurrentControlSet\Control\Class\{71a27cdd-812a-11d0-bec7-08002be2092f}" - for /f "skip=1 tokens=3*" %%a in ('reg query !key! /v "LowerFilters"') do (set val=%%a) + for /f "skip=1 tokens=3*" %%a in ('reg query %key% /v "LowerFilters"') do (set val=%%a) set val=!val:rdyboost\0=! set val=!val:\0rdyboost=! set val=!val:rdyboost=! - reg add "!key!" /v "LowerFilters" /t REG_MULTI_SZ /d "!val!" /f > nul + reg add "%key%" /v "LowerFilters" /t REG_MULTI_SZ /d "%val%" /f > nul rem Disable ReadyBoost reg add "HKLM\SYSTEM\CurrentControlSet\Services\rdyboost" /v "Start" /t REG_DWORD /d "4" /f > nul @@ -211,9 +211,9 @@ if "!diskDrive!" == "SSD" ( :: Detect if user uses laptop device or personal computer for /f "delims=:{}" %%a in ('wmic path Win32_SystemEnclosure get ChassisTypes ^| findstr [0-9]') do set "CHASSIS=%%a" set "DEVICE_TYPE=PC" -for %%a in (8 9 10 11 12 13 14 18 21 30 31 32) do if "!CHASSIS!" == "%%a" (set "DEVICE_TYPE=LAPTOP") +for %%a in (8 9 10 11 12 13 14 18 21 30 31 32) do if "%CHASSIS%" == "%%a" (set "DEVICE_TYPE=LAPTOP") :: Disable laptop-related services on PC -if "!DEVICE_TYPE!"=="PC" ( +if "%DEVICE_TYPE%"=="PC" ( call %windir%\AtlasModules\Scripts\setSvc.cmd DisplayEnhancementService 4 ) \ No newline at end of file diff --git a/src/playbook/Executables/ONED.cmd b/src/playbook/Executables/ONED.cmd index 91327e38fc..603e2e3a8d 100644 --- a/src/playbook/Executables/ONED.cmd +++ b/src/playbook/Executables/ONED.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion taskkill /f /im OneDrive*.exe > nul 2>&1 for %%a in ( diff --git a/src/playbook/Executables/PFP.cmd b/src/playbook/Executables/PFP.cmd index b2a9fe315e..3d093e7967 100644 --- a/src/playbook/Executables/PFP.cmd +++ b/src/playbook/Executables/PFP.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion :: If the "Volatile Environment" key exists, that means it is a proper user. Built in accounts/SIDs do not have this key. for /f "usebackq tokens=2 delims=\" %%a in (`reg query HKU ^| findstr /r /x /c:"HKEY_USERS\\S-.*" /c:"HKEY_USERS\\AME_UserHive_[^_]*"`) do ( @@ -12,21 +11,21 @@ for /f "usebackq tokens=2 delims=\" %%a in (`reg query HKU ^| findstr /r /x /c:" exit /b :SETPFP -set "usrPfpDir=!PUBLIC!\AccountPictures\%~1" -if exist "!usrPfpDir!" exit /b -mkdir "!usrPfpDir!" > nul +set "usrPfpDir=%PUBLIC%\AccountPictures\%~1" +if exist "%usrPfpDir%" exit /b +mkdir "%usrPfpDir%" > nul -PowerShell -NoP -C "Add-Type -AssemblyName System.Drawing; $img = [System.Drawing.Image]::FromFile((Get-Item '.\user.png')); $a = New-Object System.Drawing.Bitmap(32, 32); $graph = [System.Drawing.Graphics]::FromImage($a); $graph.DrawImage($img, 0, 0, 32, 32); $a.Save('!usrPfpDir!\32x32.png'); $b = New-Object System.Drawing.Bitmap(40, 40); $graph = [System.Drawing.Graphics]::FromImage($b); $graph.DrawImage($img, 0, 0, 40, 40); $b.Save('!usrPfpDir!\40x40.png'); $c = New-Object System.Drawing.Bitmap(48, 48); $graph = [System.Drawing.Graphics]::FromImage($c); $graph.DrawImage($img, 0, 0, 48, 48); $c.Save('!usrPfpDir!\48x48.png'); $d = New-Object System.Drawing.Bitmap(64, 64); $graph = [System.Drawing.Graphics]::FromImage($d); $graph.DrawImage($img, 0, 0, 64, 64); $d.Save('!usrPfpDir!\64x64.png'); $e = New-Object System.Drawing.Bitmap(96, 96); $graph = [System.Drawing.Graphics]::FromImage($e); $graph.DrawImage($img, 0, 0, 96, 96); $e.Save('!usrPfpDir!\96x96.png'); $f = New-Object System.Drawing.Bitmap(192, 192); $graph = [System.Drawing.Graphics]::FromImage($f); $graph.DrawImage($img, 0, 0, 192, 192); $f.Save('!usrPfpDir!\192x192.png'); $g = New-Object System.Drawing.Bitmap(208, 208); $graph = [System.Drawing.Graphics]::FromImage($g); $graph.DrawImage($img, 0, 0, 208, 208); $g.Save('!usrPfpDir!\208x208.png'); $h = New-Object System.Drawing.Bitmap(240, 240); $graph = [System.Drawing.Graphics]::FromImage($h); $graph.DrawImage($img, 0, 0, 240, 240); $h.Save('!usrPfpDir!\240x240.png'); $i = New-Object System.Drawing.Bitmap(424, 424); $graph = [System.Drawing.Graphics]::FromImage($i); $graph.DrawImage($img, 0, 0, 424, 424); $i.Save('!usrPfpDir!\424x424.png'); $j = New-Object System.Drawing.Bitmap(448, 448); $graph = [System.Drawing.Graphics]::FromImage($j); $graph.DrawImage($img, 0, 0, 448, 448); $j.Save('!usrPfpDir!\448x448.png'); $k = New-Object System.Drawing.Bitmap(1080, 1080); $graph = [System.Drawing.Graphics]::FromImage($k); $graph.DrawImage($img, 0, 0, 1080, 1080); $k.Save('!usrPfpDir!\1080x1080.png')" > nul +PowerShell -NoP -C "Add-Type -AssemblyName System.Drawing; $img = [System.Drawing.Image]::FromFile((Get-Item '.\user.png')); $a = New-Object System.Drawing.Bitmap(32, 32); $graph = [System.Drawing.Graphics]::FromImage($a); $graph.DrawImage($img, 0, 0, 32, 32); $a.Save('%usrPfpDir%\32x32.png'); $b = New-Object System.Drawing.Bitmap(40, 40); $graph = [System.Drawing.Graphics]::FromImage($b); $graph.DrawImage($img, 0, 0, 40, 40); $b.Save('%usrPfpDir%\40x40.png'); $c = New-Object System.Drawing.Bitmap(48, 48); $graph = [System.Drawing.Graphics]::FromImage($c); $graph.DrawImage($img, 0, 0, 48, 48); $c.Save('%usrPfpDir%\48x48.png'); $d = New-Object System.Drawing.Bitmap(64, 64); $graph = [System.Drawing.Graphics]::FromImage($d); $graph.DrawImage($img, 0, 0, 64, 64); $d.Save('%usrPfpDir%\64x64.png'); $e = New-Object System.Drawing.Bitmap(96, 96); $graph = [System.Drawing.Graphics]::FromImage($e); $graph.DrawImage($img, 0, 0, 96, 96); $e.Save('%usrPfpDir%\96x96.png'); $f = New-Object System.Drawing.Bitmap(192, 192); $graph = [System.Drawing.Graphics]::FromImage($f); $graph.DrawImage($img, 0, 0, 192, 192); $f.Save('%usrPfpDir%\192x192.png'); $g = New-Object System.Drawing.Bitmap(208, 208); $graph = [System.Drawing.Graphics]::FromImage($g); $graph.DrawImage($img, 0, 0, 208, 208); $g.Save('%usrPfpDir%\208x208.png'); $h = New-Object System.Drawing.Bitmap(240, 240); $graph = [System.Drawing.Graphics]::FromImage($h); $graph.DrawImage($img, 0, 0, 240, 240); $h.Save('%usrPfpDir%\240x240.png'); $i = New-Object System.Drawing.Bitmap(424, 424); $graph = [System.Drawing.Graphics]::FromImage($i); $graph.DrawImage($img, 0, 0, 424, 424); $i.Save('%usrPfpDir%\424x424.png'); $j = New-Object System.Drawing.Bitmap(448, 448); $graph = [System.Drawing.Graphics]::FromImage($j); $graph.DrawImage($img, 0, 0, 448, 448); $j.Save('%usrPfpDir%\448x448.png'); $k = New-Object System.Drawing.Bitmap(1080, 1080); $graph = [System.Drawing.Graphics]::FromImage($k); $graph.DrawImage($img, 0, 0, 1080, 1080); $k.Save('%usrPfpDir%\1080x1080.png')" > nul set "usrPfpRegKey=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\AccountPicture\Users\%~1" -reg add "!usrPfpRegKey!" /v "Image32" /t REG_SZ /d "!usrPfpDir!\32x32.png" /f > nul -reg add "!usrPfpRegKey!" /v "Image40" /t REG_SZ /d "!usrPfpDir!\40x40.png" /f > nul -reg add "!usrPfpRegKey!" /v "Image48" /t REG_SZ /d "!usrPfpDir!\48x48.png" /f > nul -reg add "!usrPfpRegKey!" /v "Image64" /t REG_SZ /d "!usrPfpDir!\64x64.png" /f > nul -reg add "!usrPfpRegKey!" /v "Image96" /t REG_SZ /d "!usrPfpDir!\96x96.png" /f > nul -reg add "!usrPfpRegKey!" /v "Image192" /t REG_SZ /d "!usrPfpDir!\192x192.png" /f > nul -reg add "!usrPfpRegKey!" /v "Image208" /t REG_SZ /d "!usrPfpDir!\208x208.png" /f > nul -reg add "!usrPfpRegKey!" /v "Image240" /t REG_SZ /d "!usrPfpDir!\240x240.png" /f > nul -reg add "!usrPfpRegKey!" /v "Image424" /t REG_SZ /d "!usrPfpDir!\424x424.png" /f > nul -reg add "!usrPfpRegKey!" /v "Image448" /t REG_SZ /d "!usrPfpDir!\448x448.png" /f > nul -reg add "!usrPfpRegKey!" /v "Image1080" /t REG_SZ /d "!usrPfpDir!\1080x1080.png" /f > nul \ No newline at end of file +reg add "%usrPfpRegKey%" /v "Image32" /t REG_SZ /d "%usrPfpDir%\32x32.png" /f > nul +reg add "%usrPfpRegKey%" /v "Image40" /t REG_SZ /d "%usrPfpDir%\40x40.png" /f > nul +reg add "%usrPfpRegKey%" /v "Image48" /t REG_SZ /d "%usrPfpDir%\48x48.png" /f > nul +reg add "%usrPfpRegKey%" /v "Image64" /t REG_SZ /d "%usrPfpDir%\64x64.png" /f > nul +reg add "%usrPfpRegKey%" /v "Image96" /t REG_SZ /d "%usrPfpDir%\96x96.png" /f > nul +reg add "%usrPfpRegKey%" /v "Image192" /t REG_SZ /d "%usrPfpDir%\192x192.png" /f > nul +reg add "%usrPfpRegKey%" /v "Image208" /t REG_SZ /d "%usrPfpDir%\208x208.png" /f > nul +reg add "%usrPfpRegKey%" /v "Image240" /t REG_SZ /d "%usrPfpDir%\240x240.png" /f > nul +reg add "%usrPfpRegKey%" /v "Image424" /t REG_SZ /d "%usrPfpDir%\424x424.png" /f > nul +reg add "%usrPfpRegKey%" /v "Image448" /t REG_SZ /d "%usrPfpDir%\448x448.png" /f > nul +reg add "%usrPfpRegKey%" /v "Image1080" /t REG_SZ /d "%usrPfpDir%\1080x1080.png" /f > nul \ No newline at end of file diff --git a/src/playbook/Executables/WIN11.cmd b/src/playbook/Executables/WIN11.cmd index 53601fc153..e489b2e6b8 100644 --- a/src/playbook/Executables/WIN11.cmd +++ b/src/playbook/Executables/WIN11.cmd @@ -1,5 +1,4 @@ @echo off -setlocal EnableDelayedExpansion :: Check if user is on Windows 11 for /f "tokens=6 delims=[.] " %%a in ('ver') do (if %%a LSS 22000 set win10=true)