Skip to content

Commit

Permalink
feat(web search): bing search provider, move location
Browse files Browse the repository at this point in the history
  • Loading branch information
he3als committed Jul 16, 2024
1 parent c915919 commit e2b77c9
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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...
Expand Down

0 comments on commit e2b77c9

Please sign in to comment.