From 2ad50739f4421c316c9a5954963d88f4cb8c3e39 Mon Sep 17 00:00:00 2001 From: he3als <65787561+he3als@users.noreply.github.com> Date: Sat, 5 Oct 2024 22:11:33 +0100 Subject: [PATCH] fix: remove problematic service scripts --- .../Notifications/Disable Notifications.cmd | 71 ------------------ .../Enable Notifications (default).cmd | 43 ----------- .../Configure UAC.lnk | Bin 1395 -> 0 bytes .../Disable UAC.cmd | 38 ---------- .../Enable UAC (default).cmd | 65 ---------------- 5 files changed, 217 deletions(-) delete mode 100644 src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Services/Notifications/Disable Notifications.cmd delete mode 100644 src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Services/Notifications/Enable Notifications (default).cmd delete mode 100644 src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Services/User Account Control (UAC)/Configure UAC.lnk delete mode 100644 src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Services/User Account Control (UAC)/Disable UAC.cmd delete mode 100644 src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Services/User Account Control (UAC)/Enable UAC (default).cmd diff --git a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Services/Notifications/Disable Notifications.cmd b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Services/Notifications/Disable Notifications.cmd deleted file mode 100644 index 874a169c0f..0000000000 --- a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Services/Notifications/Disable Notifications.cmd +++ /dev/null @@ -1,71 +0,0 @@ -@echo off - -if "%~1" == "/includeuserservice" goto main - -set "___args="%~f0" %*" -fltmc > nul 2>&1 || ( - echo Administrator privileges are required. - powershell -c "Start-Process -Verb RunAs -FilePath 'cmd' -ArgumentList """/c $env:___args"""" 2> nul || ( - echo You must run this script as admin. - if "%*"=="" pause - exit /b 1 - ) - exit /b -) - -echo Disabling notifications means **all** notifications, including system ones. -echo This includes notifications that notify you about security updates. -echo] -echo This doesn't improve performance. -echo] -echo --------------------------------------------------------------------------- -echo] -choice /c:yn /n /m "Would you like to continue anyways? [Y/N] " -if %errorlevel% neq 1 exit /b -cls - -:main -sc config WpnService start=disabled > nul -sc stop WpnService > nul 2>&1 - -reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\userNotificationListener" /v "Value" /t REG_SZ /d "Deny" /f > nul -reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings" /v "NOC_GLOBAL_SETTING_ALLOW_NOTIFICATION_SOUND" /t REG_DWORD /d "0" /f > nul -reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\PushNotifications" /v "ToastEnabled" /t REG_DWORD /d "0" /f > nul -reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\PushNotifications" /v "NoCloudApplicationNotification" /t REG_DWORD /d "1" /f > nul - -for %%a in ( - "notifications" - "privacy-notifications" -) do ( - call "%windir%\AtlasModules\Scripts\settingsPages.cmd" /hide %%~a /silent -) - -if "%~1"=="/includeuserservice" ( - call :userservice - call :disablecenter - exit /b -) else ( - for /f "tokens=6 delims=[.] " %%a in ('ver') do (if %%a LSS 22000 call :disablecenter) -) - -taskkill /f /im explorer.exe > nul 2>&1 -taskkill /f /im ShellExperienceHost.exe > nul 2>&1 -start explorer.exe - -echo Finished. -pause -exit /b - -:userservice -reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Explorer" /v "DisableNotificationCenter" /t REG_DWORD /d "1" /f > nul -call "%windir%\AtlasModules\Scripts\setSvc.cmd" "WpnUserService" 4 -for /f "tokens=5 delims=\" %%a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Services" ^| find "WpnUserService_"') do ( - call "%windir%\AtlasModules\Scripts\setSvc.cmd" "%%a" 4 - sc stop "%%a" > nul - sc delete "%%a" > nul -) -exit /b - -:disablecenter -reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Explorer" /v "DisableNotificationCenter" /t REG_DWORD /d "1" /f > nul -exit /b \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Services/Notifications/Enable Notifications (default).cmd b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Services/Notifications/Enable Notifications (default).cmd deleted file mode 100644 index 0a7ecdc5f2..0000000000 --- a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Services/Notifications/Enable Notifications (default).cmd +++ /dev/null @@ -1,43 +0,0 @@ -@echo off - -if "%~1" neq "" goto main - -set "___args="%~f0" %*" -fltmc > nul 2>&1 || ( - echo Administrator privileges are required. - powershell -c "Start-Process -Verb RunAs -FilePath 'cmd' -ArgumentList """/c $env:___args"""" 2> nul || ( - echo You must run this script as admin. - if "%*"=="" pause - exit /b 1 - ) - exit /b -) - -:main -call "%windir%\AtlasModules\Scripts\setSvc.cmd" "WpnUserService" 2 -for /f "tokens=6 delims=[.] " %%a in ('ver') do (if %%a GEQ 22000 reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\Explorer" /v "DisableNotificationCenter" /f > nul 2>&1) -if "%~1" == "/justuserservice" exit /b - -sc config WpnService start=auto > nul - -reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\userNotificationListener" /v "Value" /t REG_SZ /d "Allow" /f > nul -reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings" /v "NOC_GLOBAL_SETTING_ALLOW_NOTIFICATION_SOUND" /t REG_DWORD /d "1" /f > nul -reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\PushNotifications" /v "ToastEnabled" /t REG_DWORD /d "1" /f > nul -reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\PushNotifications" /v "NoCloudApplicationNotification" /f > nul 2>&1 - -for %%a in ( - "notifications" - "privacy-notifications" -) do ( - call "%windir%\AtlasModules\Scripts\settingsPages.cmd" /unhide %%~a /silent -) - -if "%~1" == "/silent" exit /b - -taskkill /f /im explorer.exe > nul 2>&1 -taskkill /f /im ShellExperienceHost.exe > nul 2>&1 -start explorer.exe - -echo Finished, please reboot your device for changes to apply. -pause -exit /b \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Services/User Account Control (UAC)/Configure UAC.lnk b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Services/User Account Control (UAC)/Configure UAC.lnk deleted file mode 100644 index 839101b7f218aca5869f47f9db5de1ea1635a867..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1395 zcmbtUUr1A76hB)N)TAaeGqD_kVWe|&ntxz8o2bP6$HmlGplmmrZM(92O{FJa0@EHu z3?DKqEQS7nWcZMUy%fF3Dy$TQ>ZM4;q?dw%e&??FX9Wd*m)|+(`+es--#Ons_d1D4 zlca?tno}iJ3{fl@VSlkFjIF+SrHR&bQKNc>Wq1?I3z{TKuX|S;GJY=c>TkS_rK4u^ z=mE-gl(;s%Hms9mQEjadb6-!5-hfBylF3eSq@%UR{m#KjUNOPvX^0&QRqsvVK0if` zq+R5713|aBRak*bd@zq?{`+u8mU1RgJo{F)EQ75Qa}kxK0#CzZ=g*!iQOV0t4JNyv%G`P`&7+W zRmP_fOJa86?Nq2bCxkZj%S#ZDqx{^4aJ9)ji zRQE?$MXwK{vEvZG88IwEov>G)O zZne9!Y{M@TAH1fy+QpPm5BNjuzy(=>|LaWGj*I6rivdn*D%oFt_i{(oM3vn%ZtEU6 d2>vWPQ~_!2M(gtP%oEdsZvRjFvkc}V;}=#m79aos diff --git a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Services/User Account Control (UAC)/Disable UAC.cmd b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Services/User Account Control (UAC)/Disable UAC.cmd deleted file mode 100644 index 5ea2a322d3..0000000000 --- a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Services/User Account Control (UAC)/Disable UAC.cmd +++ /dev/null @@ -1,38 +0,0 @@ -@echo off - -set "___args="%~f0" %*" -fltmc > nul 2>&1 || ( - echo Administrator privileges are required. - powershell -c "Start-Process -Verb RunAs -FilePath 'cmd' -ArgumentList """/c $env:___args"""" 2> nul || ( - echo You must run this script as admin. - if "%*"=="" pause - exit /b 1 - ) - exit /b -) - -echo Disabling UAC breaks fullscreen on certain UWP applications, one of them being Minecraft Windows 10 Edition. -echo It may also break drag and dropping between certain applications. -echo It is also less secure to disable UAC, as every application you run has complete access to your computer. -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% == 2 exit /b -cls - -reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "ConsentPromptBehaviorAdmin" /t REG_DWORD /d "0" /f > nul -reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "EnableInstallerDetection" /t REG_DWORD /d "0" /f > nul -reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "EnableLUA" /t REG_DWORD /d "0" /f > nul -reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "EnableSecureUIAPaths" /t REG_DWORD /d "0" /f > nul -reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "EnableVirtualization" /t REG_DWORD /d "0" /f > nul -reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "PromptOnSecureDesktop" /t REG_DWORD /d "0" /f > nul - -:: Lock UserAccountControlSettings.exe - users can enable UAC from there without luafv enabled, which breaks UAC completely and causes issues -reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\UserAccountControlSettings.exe" /v "Debugger" /t REG_SZ /d "conhost cmd /c \"%windir%\AtlasDesktop\7. Security\User Account Control (UAC)\Enable UAC (default).cmd\" /uacSettings" /f > nul - -call setSvc.cmd luafv 4 - -echo Finished, please reboot your device for changes to apply. -pause -exit /b \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Services/User Account Control (UAC)/Enable UAC (default).cmd b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Services/User Account Control (UAC)/Enable UAC (default).cmd deleted file mode 100644 index 82fa947f16..0000000000 --- a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Services/User Account Control (UAC)/Enable UAC (default).cmd +++ /dev/null @@ -1,65 +0,0 @@ -@echo off - -if /i "%~1" == "/uacSettings" goto uacSettings -if /i "%~1" == "/silent" goto main - -set "___args="%~f0" %*" -fltmc > nul 2>&1 || ( - echo Administrator privileges are required. - powershell -c "Start-Process -Verb RunAs -FilePath 'cmd' -ArgumentList """/c $env:___args"""" 2> nul || ( - echo You must run this script as admin. - if "%*"=="" pause - exit /b 1 - ) - exit /b -) - -:main -call setSvc.cmd luafv 2 - -:: Unlock UserAccountControlSettings.exe -reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\UserAccountControlSettings.exe" /v "Debugger" /f > nul 2>&1 - -if /i "%~1" == "/silent" exit /b - -reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "ConsentPromptBehaviorAdmin" /t REG_DWORD /d "5" /f > nul -reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "EnableInstallerDetection" /t REG_DWORD /d "1" /f > nul -reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "EnableLUA" /t REG_DWORD /d "1" /f > nul -reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "EnableSecureUIAPaths" /t REG_DWORD /d "1" /f > nul -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 ( - reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "PromptOnSecureDesktop" /t REG_DWORD /d "0" /f > nul -) - -echo] -echo Finished, please reboot your device for changes to apply. -pause -exit /b - -:uacSettings -:: set ANSI escape characters -cd /d "%~dp0" -for /f %%A in ('forfiles /m "%~nx0" /c "cmd /c echo 0x1B"') do set "ESC=%%A" - -title Enable UAC - Atlas - -mode con: cols=46 lines=14 -chcp 65001 > nul -echo] -echo %ESC%[32m Enabling UAC -echo ──────────────────────────────────────────%ESC%[0m -echo Atlas disables some services that are -echo needed for UAC to work, and enabling UAC -echo through the typical UAC settings will -echo cause issues. -echo] -echo You %ESC%[1mneed to enable UAC using the Atlas -echo script%ESC%[0m to unlock the typical UAC -echo configuration panel. -echo] -echo %ESC%[1m%ESC%[33mPress any key to enable UAC... %ESC%[?25l -pause > nul -call "%~f0" -exit /b 1 \ No newline at end of file