From 8c0a63e23288fe966c0c0939d8ad5b19af30a7de Mon Sep 17 00:00:00 2001 From: Zusier Date: Fri, 8 Nov 2024 11:55:39 -0600 Subject: [PATCH] create service modification warning --- .../Disable Lanman Workstation.cmd | 3 +++ .../Disable Network Discovery Services.cmd | 3 +++ .../Superfetch/Disable SuperFetch.cmd | 3 +++ .../AtlasModules/Scripts/serviceWarning.cmd | 21 +++++++++++++++++++ 4 files changed, 30 insertions(+) create mode 100644 src/playbook/Executables/AtlasModules/Scripts/serviceWarning.cmd diff --git a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Services/Lanman Workstation (SMB)/Disable Lanman Workstation.cmd b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Services/Lanman Workstation (SMB)/Disable Lanman Workstation.cmd index b4f878410c..ac5cbf40ed 100644 --- a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Services/Lanman Workstation (SMB)/Disable Lanman Workstation.cmd +++ b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Services/Lanman Workstation (SMB)/Disable Lanman Workstation.cmd @@ -11,6 +11,9 @@ fltmc > nul 2>&1 || ( exit /b ) +:: Warn user about service modifications +call serviceWarning.cmd + call setSvc.cmd KSecPkg 4 call setSvc.cmd LanmanServer 4 call setSvc.cmd LanmanWorkstation 4 diff --git a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Services/Network Discovery/Disable Network Discovery Services.cmd b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Services/Network Discovery/Disable Network Discovery Services.cmd index 11e649185c..73c29b2baa 100644 --- a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Services/Network Discovery/Disable Network Discovery Services.cmd +++ b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Services/Network Discovery/Disable Network Discovery Services.cmd @@ -11,6 +11,9 @@ fltmc > nul 2>&1 || ( exit /b ) +:: Warn user about service modifications +call serviceWarning.cmd + :: Unpin 'Network' from Explorer sidebar reg import "%windir%\AtlasDesktop\3. General Configuration\File Sharing\Network Navigation Pane\Disable Network Navigation Pane (default).reg" > nul diff --git a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Services/Superfetch/Disable SuperFetch.cmd b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Services/Superfetch/Disable SuperFetch.cmd index 511b2dfebb..ee1cfdfcfa 100644 --- a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Services/Superfetch/Disable SuperFetch.cmd +++ b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Services/Superfetch/Disable SuperFetch.cmd @@ -13,6 +13,9 @@ fltmc > nul 2>&1 || ( :main setlocal EnableDelayedExpansion +:: Warn user about service modifications +call serviceWarning.cmd + :: 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) diff --git a/src/playbook/Executables/AtlasModules/Scripts/serviceWarning.cmd b/src/playbook/Executables/AtlasModules/Scripts/serviceWarning.cmd new file mode 100644 index 0000000000..71bc0f799e --- /dev/null +++ b/src/playbook/Executables/AtlasModules/Scripts/serviceWarning.cmd @@ -0,0 +1,21 @@ +@echo off +goto main + +---------------------------------------- + +[FEATURES] +- Reusable warning for the user if a script modifies services and notifies of possible breakage. + +[USAGE] +call serviceWarning.cmd [optional:specific comment for service breakage, use quotes] + +---------------------------------------- + +:main +echo ------------------------------------------------------ +echo WARNING: This script will modify system services. +echo Modifying services can lead to potential breakage of features and bugs. +echo Proceed with caution, and refer to Atlas docs for more information! +if not "%~1"=="" echo Specific Note: %~1 +echo ------------------------------------------------------ +pause \ No newline at end of file