From e2b77c98841e9ad69bb709e4969618cdd28476cd Mon Sep 17 00:00:00 2001 From: he3als <65787561+he3als@users.noreply.github.com> Date: Tue, 16 Jul 2024 22:02:59 +0100 Subject: [PATCH] feat(web search): bing search provider, move location --- .../Location/Disable Location (default).cmd | 1 - .../Location/Enable Location.cmd | 5 ---- .../Disable Web Search (default).cmd | 1 + .../Enable Web Search.cmd | 24 +++++++++++++------ 4 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/playbook/Executables/AtlasDesktop/3. General Configuration/Location/Disable Location (default).cmd b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Location/Disable Location (default).cmd index bc4283c0a3..bf05c63dff 100644 --- a/src/playbook/Executables/AtlasDesktop/3. General Configuration/Location/Disable Location (default).cmd +++ b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Location/Disable Location (default).cmd @@ -17,7 +17,6 @@ fltmc > nul 2>&1 || ( ( sc config lfsvc start=disabled sc config MapsBroker start=disabled - reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v AllowSearchToUseLocation /t REG_DWORD /d 0 /f reg add "HKLM\SOFTWARE\Policies\Microsoft\FindMyDevice" /v AllowFindMyDevice /t REG_DWORD /d 0 /f reg add "HKLM\SOFTWARE\Policies\Microsoft\FindMyDevice" /v LocationSyncEnabled /t REG_DWORD /d 0 /f ) > nul diff --git a/src/playbook/Executables/AtlasDesktop/3. General Configuration/Location/Enable Location.cmd b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Location/Enable Location.cmd index e59dfa1801..111181531e 100644 --- a/src/playbook/Executables/AtlasDesktop/3. General Configuration/Location/Enable Location.cmd +++ b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Location/Enable Location.cmd @@ -28,11 +28,6 @@ call "%windir%\AtlasModules\Scripts\settingsPages.cmd" /unhide privacy-location if "%~1"=="/silent" exit /b -set key="HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v AllowSearchToUseLocation -choice /c:yn /n /m "Would you like to allow Windows Search to use your location? [Y/N] " -if %errorlevel%==1 reg delete %key% /f > nul -if %errorlevel%==2 reg add %key% /t REG_DWORD /d 0 /f > nul - set key1="HKLM\SOFTWARE\Policies\Microsoft\FindMyDevice" choice /c:yn /n /m "Would you like to unlock Find My Device functionality? [Y/N] " if %errorlevel%==1 ( diff --git a/src/playbook/Executables/AtlasDesktop/3. General Configuration/Web Search (includes Search Highlights)/Disable Web Search (default).cmd b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Web Search (includes Search Highlights)/Disable Web Search (default).cmd index 11f3fcb42a..231f22b07c 100644 --- a/src/playbook/Executables/AtlasDesktop/3. General Configuration/Web Search (includes Search Highlights)/Disable Web Search (default).cmd +++ b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Web Search (includes Search Highlights)/Disable Web Search (default).cmd @@ -17,6 +17,7 @@ echo Disabling Web Search ^& Search Highlights... call "%windir%\AtlasModules\Scripts\settingsPages.cmd" /hide search-permissions /silent ( + reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v "AllowSearchToUseLocation" /t REG_DWORD /d 0 /f reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "BingSearchEnabled" /t REG_DWORD /d "0" /f reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\SearchSettings" /v "IsAADCloudSearchEnabled" /t REG_DWORD /d "0" /f reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\SearchSettings" /v "IsDeviceSearchHistoryEnabled" /t REG_DWORD /d "0" /f diff --git a/src/playbook/Executables/AtlasDesktop/3. General Configuration/Web Search (includes Search Highlights)/Enable Web Search.cmd b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Web Search (includes Search Highlights)/Enable Web Search.cmd index d0a72f2c06..27ef61863f 100644 --- a/src/playbook/Executables/AtlasDesktop/3. General Configuration/Web Search (includes Search Highlights)/Enable Web Search.cmd +++ b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Web Search (includes Search Highlights)/Enable Web Search.cmd @@ -11,10 +11,26 @@ fltmc > nul 2>&1 || ( exit /b ) -call "%windir%\AtlasModules\Scripts\wingetCheck.cmd" /nodashes +call "%windir%\AtlasModules\Scripts\wingetCheck.cmd" if %errorlevel% neq 0 exit /b 1 echo Enabling Web Search ^& Search Highlights... + +echo] +set key="HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v AllowSearchToUseLocation +choice /c:yn /n /m "Would you like web search to use your location for results? [Y/N] " +if %errorlevel%==1 reg delete %key% /f > nul +if %errorlevel%==2 reg add %key% /t REG_DWORD /d 0 /f > nul + +:: Enable search indexing to prevent a visual bug +for /f "tokens=6 delims=[.] " %%a in ('ver') do (if %%a GEQ 22000 sc query wsearch | find "STOPPED" > nul && call :searchIndexBug) + +:: Install the Bing search provider +echo] +echo Installing the Bing search provider... +winget install -e --id 9NZBF4GT040C --uninstall-previous -h --accept-source-agreements --accept-package-agreements --force --disable-interactivity > nul + +:: Main settings call "%windir%\AtlasModules\Scripts\settingsPages.cmd" /unhide search-permissions /silent ( reg delete "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "BingSearchEnabled" /f @@ -33,12 +49,6 @@ call "%windir%\AtlasModules\Scripts\settingsPages.cmd" /unhide search-permission start explorer.exe ) > nul 2>&1 -:: Enable search indexing to prevent a visual bug -for /f "tokens=6 delims=[.] " %%a in ('ver') do (if %%a GEQ 22000 sc query wsearch | find "STOPPED" > nul && call :searchIndexBug) - -:: Install the Bing search provider -winget install -e --id 9NZBF4GT040C --uninstall-previous -h --accept-source-agreements --accept-package-agreements --force --disable-interactivity > nul - echo] echo Finished, you should be able to use Web Search and Search Highlights. echo Press any key to exit...