Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: services in folder reorganisation, enable all script, misc fixes #1123

Merged
merged 16 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/playbook/Configuration/custom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ actions:
# Prevent annoying notifications during deployment
- !taskKill: {name: 'explorer'}
- !cmd:
command: '"AtlasDesktop\3. General Configuration\Notifications\Disable Notifications.cmd" /includeuserservice'
command: '"AtlasDesktop\6. Advanced Configuration\Services\Notifications\Disable Notifications.cmd" /includeuserservice'
exeDir: true
wait: true
runas: currentUserElevated
Expand Down
1 change: 1 addition & 0 deletions src/playbook/Configuration/tweaks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ tasks:
- tweaks\qol\explorer\remove-context-menus\paint-3D.yml
- tweaks\qol\explorer\remove-context-menus\share.yml
- tweaks\qol\explorer\remove-context-menus\troubleshooting-compat.yml
- tweaks\qol\explorer\remove-context-menus\printing.yml

# -------------------------------------------------------------------------- #
# qol\security #
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ actions:
# Delete files exclusive to Windows 11
- !file: {path: '%windir%\AtlasDesktop\3. General Configuration\Background Apps', builds: [ '<22000' ]}
- !file: {path: '%windir%\AtlasModules\Tools\TimerResolution.exe', builds: [ '<22000' ]}
- !file: {path: '%windir%\AtlasDesktop\3. General Configuration\Power\Timer Resolution', builds: [ '<22000' ]}
- !file: {path: '%windir%\AtlasDesktop\3. General Configuration\Timer Resolution', builds: [ '<22000' ]}
- !file: {path: '%windir%\AtlasDesktop\4. Interface Tweaks\File Explorer Customization\Compact View', builds: [ '<22000' ]}
- !file: {path: '%windir%\AtlasDesktop\4. Interface Tweaks\File Explorer Customization\Gallery', builds: [ '<22000' ]}
- !file: {path: '%windir%\AtlasDesktop\4. Interface Tweaks\Context Menu\Windows 11', builds: [ '<22000' ]}
- !file: {path: '%windir%\AtlasDesktop\4. Interface Tweaks\Snap Layouts', builds: [ '<22000' ]}

# Delete files exclusive to Windows 10
- !file: {path: '%windir%\AtlasDesktop\4. Interface Tweaks\File Explorer Customization\Folders in This PC', builds: [ '>=22000' ]}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: Enable Notifications
description: Notifications were turned off at the start of the Playbook to prevent random notifications from interfering with the process. This task re-enables notifications if the user chose to do so.
description: Notifications were turned off at the start of the Playbook to prevent random notifications from interfering with the process. This task re-enables notifications.
actions:
- !cmd:
command: '"AtlasDesktop\3. General Configuration\Notifications\Enable Notifications.cmd" /silent'
command: '"AtlasDesktop\6. Advanced Configuration\Services\Notifications\Enable Notifications (default).cmd" /silent'
exeDir: true
wait: true
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ description: Adds and sets the Atlas themes by default
actions:
# Apply theme file
- !taskKill: {name: 'SystemSettings', ignoreErrors: true}
- !cmd:
command: 'explorer "%windir%\Resources\Themes\atlas-v0.4.x-dark.theme" & timeout /t 6 /nobreak > nul'
- !powerShell:
command: >-
Start-Process -FilePath explorer -ArgumentList """$([Environment]::GetFolderPath('Windows'))\Resources\Themes\atlas-v0.4.x-dark.theme""";
Start-Sleep 6
wait: true
runas: currentUser
timeout: 30
runas: currentUserElevated

# For Windows 11, set recent theme selection
- !taskKill: {name: 'SystemSettings', ignoreErrors: true}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: Remove 'Printing' from Context Menus
description: Removes printing from context menus as users normally print from apps anyways
actions:
- !cmd:
command: '"AtlasDesktop\6. Advanced Configuration\Services\Printing\Disable Printing.cmd" /justcontext'
exeDir: true
wait: true
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Disables Windows Update from automatically updating Windows for QoL
actions:
# Disable auto-updates
- !cmd:
command: 'reg import "AtlasDesktop\3. General Configuration\Windows Update\Automatic Updates\Disable Automatic Updates (default).reg"'
command: 'reg import "AtlasDesktop\3. General Configuration\Automatic Updates\Disable Automatic Updates (default).reg"'
exeDir: true
wait: true
option: 'auto-updates-disable'
Expand Down
4 changes: 2 additions & 2 deletions src/playbook/Configuration/tweaks/scripts/script-power.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Executes script to configure power settings for the best performanc
actions:
# Disable power saving features
- !cmd:
command: '"AtlasDesktop\3. General Configuration\Power\Power-saving\Disable Power-saving.cmd" -Silent'
command: '"AtlasDesktop\3. General Configuration\Power-saving\Disable Power-saving.cmd" -Silent'
exeDir: true
wait: true
weight: 20
Expand All @@ -20,7 +20,7 @@ actions:
# Disable Hibernation
# Disabling makes NTFS accessible outside of Windows
- !cmd:
command: '"AtlasDesktop\3. General Configuration\Power\Hibernation\Disable Hibernation (default).cmd" /silent'
command: '"AtlasDesktop\3. General Configuration\Hibernation\Disable Hibernation (default).cmd" /silent'
exeDir: true
wait: true
weight: 20
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"EnableSnapAssistFlyout"=dword:00000000
"EnableSnapBar"=dword:00000000
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"EnableSnapAssistFlyout"=dword:00000001
"EnableSnapBar"=dword:00000001
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,13 @@ if %ERRORLEVEL% NEQ 0 (
echo Configuring Process Explorer...
:: Run Process Explorer only in one instance
reg add "HKCU\SOFTWARE\Sysinternals\Process Explorer" /v "OneInstance" /t REG_DWORD /d "1" /f > nul
sc config pcw start=disabled > nul
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\taskmgr.exe" /v "Debugger" /t REG_SZ /d "%windir%\AtlasModules\Apps\ProcessExplorer\procexp.exe" /f > nul

echo The 'pcw' service in Windows is needed for Task Manager and performance counters.
echo Disabling it matters less as you have Process Explorer, but software and Windows might have unexpected issues.
choice /c:yn /n /m "Would you like to disable it? [Y/N] "
sc config pcw start=disabled > nul

echo]
echo Finished, changes have been applied.
pause
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
@echo off

if "%~1"=="/silent" goto main

set "___args="%~f0" %*"
fltmc > nul 2>&1 || (
echo Administrator privileges are required.
Expand All @@ -11,6 +13,7 @@ fltmc > nul 2>&1 || (
exit /b
)

:main
:: Enable Bluetooth drivers and services
for %%a in (
"BluetoothUserService"
Expand Down Expand Up @@ -41,6 +44,8 @@ call toggleDev.cmd -Silent -Enable '*Bluetooth*'
:: 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 "2" /f > nul

if "%~1"=="/silent" exit /b

choice /c:yn /n /m "Would you like to enable the 'Bluetooth File Transfer' Send To context menu entry? [Y/N] "
if %ERRORLEVEL% == 1 call "%windir%\AtlasDesktop\4. Interface Tweaks\Context Menus\Send To\Debloat Send To Context Menu.cmd" -Enable @('Bluetooth')
if %ERRORLEVEL% == 2 call "%windir%\AtlasDesktop\4. Interface Tweaks\Context Menus\Send To\Debloat Send To Context Menu.cmd" -Disable @('Bluetooth')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ reg add "HKCR\DesktopBackground\Shell\NVIDIAContainer" /v "Position" /t REG_SZ /
reg add "HKCR\DesktopBackground\Shell\NVIDIAContainer" /v "SubCommands" /t REG_SZ /d "" /f > nul
reg add "HKCR\DesktopBackground\shell\NVIDIAContainer\shell\NVIDIAContainer001" /v "HasLUAShield" /t REG_SZ /d "" /f > nul
reg add "HKCR\DesktopBackground\shell\NVIDIAContainer\shell\NVIDIAContainer001" /v "MUIVerb" /t REG_SZ /d "Enable NVIDIA Display Container LS" /f > nul
reg add "HKCR\DesktopBackground\shell\NVIDIAContainer\shell\NVIDIAContainer001\command" /ve /t REG_SZ /d "\"%windir%\AtlasDesktop\3. General Configuration\NVIDIA Display Container\Enable NVIDIA Display Container LS.cmd"" /f > nul
reg add "HKCR\DesktopBackground\shell\NVIDIAContainer\shell\NVIDIAContainer001\command" /ve /t REG_SZ /d "\"%windir%\AtlasDesktop\6. Advanced Configuration\Services\NVIDIA Display Container\Enable NVIDIA Display Container LS.cmd (default)"" /f > nul
reg add "HKCR\DesktopBackground\shell\NVIDIAContainer\shell\NVIDIAContainer002" /v "HasLUAShield" /t REG_SZ /d "" /f > nul
reg add "HKCR\DesktopBackground\shell\NVIDIAContainer\shell\NVIDIAContainer002" /v "MUIVerb" /t REG_SZ /d "Disable NVIDIA Display Container LS" /f > nul
reg add "HKCR\DesktopBackground\shell\NVIDIAContainer\shell\NVIDIAContainer002\command" /ve /t REG_SZ /d "\"%windir%\AtlasDesktop\3. General Configuration\NVIDIA Display Container\Disable NVIDIA Display Container LS.cmd"" /f > nul
reg add "HKCR\DesktopBackground\shell\NVIDIAContainer\shell\NVIDIAContainer002\command" /ve /t REG_SZ /d "\"%windir%\AtlasDesktop\6. Advanced Configuration\Services\NVIDIA Display Container\Disable NVIDIA Display Container LS.cmd"" /f > nul

taskkill /f /im explorer.exe > nul 2>&1
start explorer.exe
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
@echo off

if "%~1"=="/silent" goto main

set "___args="%~f0" %*"
fltmc > nul 2>&1 || (
echo Administrator privileges are required.
Expand All @@ -11,8 +13,10 @@ fltmc > nul 2>&1 || (
exit /b
)

:main
:: check if the service exists
reg query "HKCR\DesktopBackground\shell\NVIDIAContainer" > nul 2>&1 || (
if "%~1"=="/silent" exit /b
echo The context menu does not exist, thus you cannot continue.
echo]
pause
Expand All @@ -28,6 +32,8 @@ reg delete "HKCR\DesktopBackground\Shell\NVIDIAContainer" /f > nul 2>&1
taskkill /f /im explorer.exe > nul 2>&1
start explorer.exe

if "%~1"=="/silent" exit /b

echo Finished, changes have been applied.
pause
exit /b
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
@echo off

if "%~1"=="/silent" goto main

set "___args="%~f0" %*"
fltmc > nul 2>&1 || (
echo Administrator privileges are required.
Expand All @@ -11,18 +13,22 @@ fltmc > nul 2>&1 || (
exit /b
)

:main
:: check if the service exists
reg query "HKLM\SYSTEM\CurrentControlSet\Services\NVDisplay.ContainerLocalSystem" > nul 2>&1 || (
if "%~1"=="/silent" exit /b
echo The NVIDIA Display Container LS service does not exist, you cannot continue.
echo You may not have NVIDIA drivers installed.
echo]
pause
exit /b 1
exit /b
)

call setSvc.cmd NVDisplay.ContainerLocalSystem 2
sc start NVDisplay.ContainerLocalSystem > nul 2>&1

if "%~1"=="/silent" exit /b

echo Finished, changes have been applied.
pause
exit /b
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fltmc > nul 2>&1 || (

:main
:: Enable Lanman Workstation (SMB) as a dependency
call "%windir%\AtlasDesktop\6. Advanced Configuration\Lanman Workstation (SMB)\Enable Lanman Workstation (default).cmd" /silent
call "%windir%\AtlasDesktop\6. Advanced Configuration\Services\Lanman Workstation (SMB)\Enable Lanman Workstation (default).cmd" /silent
:: Enable EventLog as a dependency
call setSvc.cmd eventlog 2

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@echo off

if "%~1" == "/justuserservice" goto main
if "%~1" neq "" goto main

set "___args="%~f0" %*"
fltmc > nul 2>&1 || (
Expand All @@ -15,12 +15,11 @@ fltmc > nul 2>&1 || (

:main
call "%windir%\AtlasModules\Scripts\setSvc.cmd" "WpnUserService" 2
for /f "tokens=6 delims=[.] " %%a in ('ver') do (if %%a GEQ 22000 call :enablecenter)
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

call :enablecenter
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
Expand All @@ -42,8 +41,4 @@ start explorer.exe

echo Finished, please reboot your device for changes to apply.
pause
exit /b

:enablecenter
reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\Explorer" /v "DisableNotificationCenter" /f > nul 2>&1
exit /b
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
setlocal EnableDelayedExpansion

if "%~1" == "/silent" goto main
if "%~1" == "/justcontext" goto main

set "___args="%~f0" %*"
fltmc > nul 2>&1 || (
Expand Down Expand Up @@ -53,20 +54,14 @@ for /f "tokens=6 delims=[.] " %%a in ('ver') do (
)
)

if "%~1" == "/justcontext" exit /b

echo Disabling services...
call "%windir%\AtlasModules\Scripts\setSvc.cmd" Spooler 4
call "%windir%\AtlasModules\Scripts\setSvc.cmd" PrintWorkFlowUserSvc 4

call "%windir%\AtlasModules\Scripts\settingsPages.cmd" /hide printers

echo Disabling capabilities...
for %%a in (
"Print.Fax.Scan~~~~0.0.1.0"
"Print.Management.Console~~~~0.0.1.0"
) do (
dism /Online /Remove-Capability /CapabilityName:"%%a" /NoRestart > nul
)

echo Disabling features...
for %%a in (
"Printing-Foundation-Features"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
@echo off
setlocal EnableDelayedExpansion

if "%~1"=="/silent" goto main

echo Enabling printing...
echo]

set "___args="%~f0" %*"
fltmc > nul 2>&1 || (
echo Administrator privileges are required.
Expand All @@ -12,8 +17,8 @@ fltmc > nul 2>&1 || (
exit /b
)

echo Enabling printing...
echo]
choice /c:yn /n /m "Would you like to add 'Print' to the context menu? [Y/N] "
if "%errorlevel%" neq "1" goto :main

echo Adding 'Print' to context menu...
reg delete "HKCR\SystemFileAssociations\image\shell\print" /v "ProgrammaticAccessOnly" /f > nul 2>&1
Expand Down Expand Up @@ -50,20 +55,13 @@ for /f "tokens=6 delims=[.] " %%a in ('ver') do (
)
)

:main
echo Enabling services...
call setSvc.cmd Spooler 2
call setSvc.cmd PrintWorkFlowUserSvc 3

call "%windir%\AtlasModules\Scripts\settingsPages.cmd" /unhide printers

echo Enabling capabilities (this might take a while)...
for %%a in (
"Print.Fax.Scan~~~~0.0.1.0"
"Print.Management.Console~~~~0.0.1.0"
) do (
dism /Online /Add-Capability /CapabilityName:"%%a" /NoRestart > nul
)

echo Enabling features...
for %%a in (
"Printing-Foundation-Features"
Expand All @@ -74,6 +72,14 @@ for %%a in (
dism /Online /Enable-Feature /FeatureName:"%%a" /NoRestart > nul
)

echo Enabling capabilities (this might take a while)...
dism /Online /Add-Capability /CapabilityName:"Print.Management.Console~~~~0.0.1.0" /NoRestart > nul

if "%~1"=="/silent" exit /b

choice /c:yn /n /m "Would you want to enable Fax and Scan functionality? [Y/N] "
if "%errorlevel%"=="1" dism /Online /Add-Capability /CapabilityName:"Print.Fax.Scan~~~~0.0.1.0" /NoRestart > nul

echo]
echo Finished, please reboot your device for changes to apply.
pause
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@ fltmc > nul 2>&1 || (
:main
setlocal EnableDelayedExpansion

rem Remove lower filters for rdyboost driver
:: 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)
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

rem Disable ReadyBoost
:: Disable ReadyBoost
reg add "HKLM\SYSTEM\CurrentControlSet\Services\rdyboost" /v "Start" /t REG_DWORD /d "4" /f > nul

rem Remove ReadyBoost tab
:: Remove ReadyBoost tab
reg delete "HKCR\Drive\shellex\PropertySheetHandlers\{55B3A0BD-4D28-42fe-8CFB-FA3EDFF969B8}" /f > nul 2>&1

rem Disable SysMain (Prefetch, Memory Management features)
:: Disable SysMain (Prefetch, Memory Management features)
reg add "HKLM\SYSTEM\CurrentControlSet\Services\SysMain" /v "Start" /t REG_DWORD /d "4" /f > nul

echo Finished, please reboot your device for changes to apply.
Expand Down
Loading
Loading