Skip to content

Commit

Permalink
create service modification warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Zusier committed Nov 8, 2024
1 parent a5e9bb3 commit 8c0a63e
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
21 changes: 21 additions & 0 deletions src/playbook/Executables/AtlasModules/Scripts/serviceWarning.cmd
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 8c0a63e

Please sign in to comment.