diff --git a/Disable Cortana & start menu Bing search.reg b/Disable Cortana & start menu Bing search.reg new file mode 100644 index 0000000000000000000000000000000000000000..23709702a3af4ead92d97495de06b163dc6bde3c --- /dev/null +++ b/Disable Cortana & start menu Bing search.reg @@ -0,0 +1,7 @@ +Windows Registry Editor Version 5.00 + +[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Explorer] +"DisableSearchBoxSuggestions"=dword:00000001 + +[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search] +"AllowCortana"=dword:00000000 \ No newline at end of file diff --git a/Fix blank icons.bat b/Fix blank icons.bat index 4766b8e9fa3cc9ac88fda35056c691f81d093bdb..0e8fcc29a8ed02cdcd99e0cd3bb97b89c4e05741 100644 --- a/Fix blank icons.bat +++ b/Fix blank icons.bat @@ -35,4 +35,4 @@ IF ERRORLEVEL 1 goto yes shutdown /r /f /t 00 :no -exit /B +exit diff --git a/Fix edgegdi.dll.bat b/Fix edgegdi.dll.bat index bdb7249281c48723ea6461bf7c719179173fa57f..16cb899dd787f89bc50739b19ff9ece4ffe9d918 100644 --- a/Fix edgegdi.dll.bat +++ b/Fix edgegdi.dll.bat @@ -1,19 +1,19 @@ @echo off REM Ensure Admin rights -:init setlocal DisableDelayedExpansion set "batchPath=%~0" for %%k in (%0) do set batchName=%%~nk set "vbsGetPrivileges=%temp%\OEgetPriv_%batchName%.vbs" setlocal EnableDelayedExpansion - -:checkPrivileges -NET FILE 1>nul 2>nul -if '%errorlevel%' == '0' ( goto gotPrivileges ) else ( goto getPrivileges ) +net file 1>nul 2>nul +if '%errorlevel%' == '0' (goto gotPrivileges) else (goto getPrivileges) :getPrivileges if '%1'=='ELEV' (echo ELEV & shift /1 & goto gotPrivileges) - +REM If you have non-ASCII chars in your path you'll need to set the codepage appropriate to your locale: +REM chcp 1252 +REM (ANSI-Latin1 - Western European, e.g. German) +cls echo Set UAC = CreateObject^("Shell.Application"^) > "%vbsGetPrivileges%" echo args = "ELEV " >> "%vbsGetPrivileges%" echo For Each strArg in WScript.Arguments >> "%vbsGetPrivileges%" @@ -21,7 +21,7 @@ echo args = args ^& strArg ^& " " >> "%vbsGetPrivileges%" echo Next >> "%vbsGetPrivileges%" echo UAC.ShellExecute "!batchPath!", args, "", "runas", 1 >> "%vbsGetPrivileges%" "%SystemRoot%\System32\WScript.exe" "%vbsGetPrivileges%" %* -exit /B +exit :gotPrivileges if '%1'=='ELEV' (del "%vbsGetPrivileges%" 1>nul 2>nul & shift /1) diff --git a/Fix long login times.bat b/Fix long login times.bat index 425647e1ea4a549de1a2bafa5422bc81d4941a7a..b5807c31d7f969a24be89cd1716474e9b7d7c7e0 100644 --- a/Fix long login times.bat +++ b/Fix long login times.bat @@ -1,19 +1,19 @@ @echo off REM Ensure Admin rights -:init setlocal DisableDelayedExpansion set "batchPath=%~0" for %%k in (%0) do set batchName=%%~nk set "vbsGetPrivileges=%temp%\OEgetPriv_%batchName%.vbs" setlocal EnableDelayedExpansion - -:checkPrivileges -NET FILE 1>nul 2>nul -if '%errorlevel%' == '0' ( goto gotPrivileges ) else ( goto getPrivileges ) +net file 1>nul 2>nul +if '%errorlevel%' == '0' (goto gotPrivileges) else (goto getPrivileges) :getPrivileges if '%1'=='ELEV' (echo ELEV & shift /1 & goto gotPrivileges) - +REM If you have non-ASCII chars in your path you'll need to set the codepage appropriate to your locale: +REM chcp 1252 +REM (ANSI-Latin1 - Western European, e.g. German) +cls echo Set UAC = CreateObject^("Shell.Application"^) > "%vbsGetPrivileges%" echo args = "ELEV " >> "%vbsGetPrivileges%" echo For Each strArg in WScript.Arguments >> "%vbsGetPrivileges%" @@ -21,7 +21,7 @@ echo args = args ^& strArg ^& " " >> "%vbsGetPrivileges%" echo Next >> "%vbsGetPrivileges%" echo UAC.ShellExecute "!batchPath!", args, "", "runas", 1 >> "%vbsGetPrivileges%" "%SystemRoot%\System32\WScript.exe" "%vbsGetPrivileges%" %* -exit /B +exit :gotPrivileges if '%1'=='ELEV' (del "%vbsGetPrivileges%" 1>nul 2>nul & shift /1) @@ -34,9 +34,9 @@ for /f "tokens=*" %%a in ('dir /A:D /b') do ( pushd "C:\Users\%%a\AppData\Local\Microsoft\Windows" && ( rd /s /q WebCache del /q /f WebCacheLock.dat - ) +) popd - ) +) ) popd ) diff --git a/Fix printer installation error 0x00000bcb.bat b/Fix printer installation error 0x00000bcb.bat index f8c2d9413157b762720717253aaa528dc270f0f0..b6cf747c9fbcdd31cef6d15aa129b14af315098c 100644 --- a/Fix printer installation error 0x00000bcb.bat +++ b/Fix printer installation error 0x00000bcb.bat @@ -1,19 +1,19 @@ @echo off REM Ensure Admin rights -:init setlocal DisableDelayedExpansion set "batchPath=%~0" for %%k in (%0) do set batchName=%%~nk set "vbsGetPrivileges=%temp%\OEgetPriv_%batchName%.vbs" setlocal EnableDelayedExpansion - -:checkPrivileges -NET FILE 1>nul 2>nul -if '%errorlevel%' == '0' ( goto gotPrivileges ) else ( goto getPrivileges ) +net file 1>nul 2>nul +if '%errorlevel%' == '0' (goto gotPrivileges) else (goto getPrivileges) :getPrivileges if '%1'=='ELEV' (echo ELEV & shift /1 & goto gotPrivileges) - +REM If you have non-ASCII chars in your path you'll need to set the codepage appropriate to your locale: +REM chcp 1252 +REM (ANSI-Latin1 - Western European, e.g. German) +cls echo Set UAC = CreateObject^("Shell.Application"^) > "%vbsGetPrivileges%" echo args = "ELEV " >> "%vbsGetPrivileges%" echo For Each strArg in WScript.Arguments >> "%vbsGetPrivileges%" @@ -21,7 +21,7 @@ echo args = args ^& strArg ^& " " >> "%vbsGetPrivileges%" echo Next >> "%vbsGetPrivileges%" echo UAC.ShellExecute "!batchPath!", args, "", "runas", 1 >> "%vbsGetPrivileges%" "%SystemRoot%\System32\WScript.exe" "%vbsGetPrivileges%" %* -exit /B +exit :gotPrivileges if '%1'=='ELEV' (del "%vbsGetPrivileges%" 1>nul 2>nul & shift /1) @@ -34,7 +34,7 @@ echo. echo Add your printer the usual way now. pause echo. -echo TRemoving registry hack again. . . +echo Removing registry hack again. . . reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Printers\PointAndPrint" /v "RestrictDriverInstallationToAdministrators" /f echo Done. pause diff --git a/Fix printer not install- and selectable.bat b/Fix printer not install- and selectable.bat index 4a1bee40474a70be8d88c67ca32e1a04362a80cd..373be57753deb20f4e13b63ff5cfb87604cbc6d1 100644 --- a/Fix printer not install- and selectable.bat +++ b/Fix printer not install- and selectable.bat @@ -1,19 +1,19 @@ @echo off REM Ensure Admin rights -:init setlocal DisableDelayedExpansion set "batchPath=%~0" for %%k in (%0) do set batchName=%%~nk set "vbsGetPrivileges=%temp%\OEgetPriv_%batchName%.vbs" setlocal EnableDelayedExpansion - -:checkPrivileges -NET FILE 1>nul 2>nul -if '%errorlevel%' == '0' ( goto gotPrivileges ) else ( goto getPrivileges ) +net file 1>nul 2>nul +if '%errorlevel%' == '0' (goto gotPrivileges) else (goto getPrivileges) :getPrivileges if '%1'=='ELEV' (echo ELEV & shift /1 & goto gotPrivileges) - +REM If you have non-ASCII chars in your path you'll need to set the codepage appropriate to your locale: +REM chcp 1252 +REM (ANSI-Latin1 - Western European, e.g. German) +cls echo Set UAC = CreateObject^("Shell.Application"^) > "%vbsGetPrivileges%" echo args = "ELEV " >> "%vbsGetPrivileges%" echo For Each strArg in WScript.Arguments >> "%vbsGetPrivileges%" @@ -21,7 +21,7 @@ echo args = args ^& strArg ^& " " >> "%vbsGetPrivileges%" echo Next >> "%vbsGetPrivileges%" echo UAC.ShellExecute "!batchPath!", args, "", "runas", 1 >> "%vbsGetPrivileges%" "%SystemRoot%\System32\WScript.exe" "%vbsGetPrivileges%" %* -exit /B +exit :gotPrivileges if '%1'=='ELEV' (del "%vbsGetPrivileges%" 1>nul 2>nul & shift /1) diff --git a/Fix prompt for password change.bat b/Fix prompt for password change.bat index 398de676df1eb40090e7e3eb5502280f613a6ce3..7c84ace7005d55b444f9b62de3171381bf59ddee 100644 --- a/Fix prompt for password change.bat +++ b/Fix prompt for password change.bat @@ -1,4 +1,33 @@ @echo off +REM Ensure Admin rights +setlocal DisableDelayedExpansion +set "batchPath=%~0" +for %%k in (%0) do set batchName=%%~nk +set "vbsGetPrivileges=%temp%\OEgetPriv_%batchName%.vbs" +setlocal EnableDelayedExpansion +net file 1>nul 2>nul +if '%errorlevel%' == '0' (goto gotPrivileges) else (goto getPrivileges) + +:getPrivileges +if '%1'=='ELEV' (echo ELEV & shift /1 & goto gotPrivileges) +REM If you have non-ASCII chars in your path you'll need to set the codepage appropriate to your locale: +REM chcp 1252 +REM (ANSI-Latin1 - Western European, e.g. German) +cls +echo Set UAC = CreateObject^("Shell.Application"^) > "%vbsGetPrivileges%" +echo args = "ELEV " >> "%vbsGetPrivileges%" +echo For Each strArg in WScript.Arguments >> "%vbsGetPrivileges%" +echo args = args ^& strArg ^& " " >> "%vbsGetPrivileges%" +echo Next >> "%vbsGetPrivileges%" +echo UAC.ShellExecute "!batchPath!", args, "", "runas", 1 >> "%vbsGetPrivileges%" +"%SystemRoot%\System32\WScript.exe" "%vbsGetPrivileges%" %* +exit + +:gotPrivileges +if '%1'=='ELEV' (del "%vbsGetPrivileges%" 1>nul 2>nul & shift /1) + + +REM Functional part wmic UserAccount set PasswordExpires=False pause exit diff --git a/Fix search & settings.bat b/Fix search & settings.bat deleted file mode 100644 index 24b3801f8ea244d03fdc7527a0804ba5ba332574..0000000000000000000000000000000000000000 --- a/Fix search & settings.bat +++ /dev/null @@ -1,6 +0,0 @@ -@echo off -rd /s /q "%localappdata%\Packages\windows.immersivecontrolpanel_cw5n1h2txyewy" -robocopy /e "C:\Users\Administrator\AppData\Local\Packages\windows.immersivecontrolpanel_cw5n1h2txyewy" "%localappdata%\Packages\windows.immersivecontrolpanel_cw5n1h2txyewy" -echo Done. -pause -exit diff --git a/Fix search and settings.bat b/Fix search and settings.bat new file mode 100644 index 0000000000000000000000000000000000000000..c765feaee209d1ae6592ec22760454764b380330 --- /dev/null +++ b/Fix search and settings.bat @@ -0,0 +1,35 @@ +@echo off +REM Ensure Admin rights +setlocal DisableDelayedExpansion +set "batchPath=%~0" +for %%k in (%0) do set batchName=%%~nk +set "vbsGetPrivileges=%temp%\OEgetPriv_%batchName%.vbs" +setlocal EnableDelayedExpansion +net file 1>nul 2>nul +if '%errorlevel%' == '0' (goto gotPrivileges) else (goto getPrivileges) + +:getPrivileges +if '%1'=='ELEV' (echo ELEV & shift /1 & goto gotPrivileges) +REM If you have non-ASCII chars in your path you'll need to set the codepage appropriate to your locale: +REM chcp 1252 +REM (ANSI-Latin1 - Western European, e.g. German) +cls +echo Set UAC = CreateObject^("Shell.Application"^) > "%vbsGetPrivileges%" +echo args = "ELEV " >> "%vbsGetPrivileges%" +echo For Each strArg in WScript.Arguments >> "%vbsGetPrivileges%" +echo args = args ^& strArg ^& " " >> "%vbsGetPrivileges%" +echo Next >> "%vbsGetPrivileges%" +echo UAC.ShellExecute "!batchPath!", args, "", "runas", 1 >> "%vbsGetPrivileges%" +"%SystemRoot%\System32\WScript.exe" "%vbsGetPrivileges%" %* +exit + +:gotPrivileges +if '%1'=='ELEV' (del "%vbsGetPrivileges%" 1>nul 2>nul & shift /1) + + +REM Functional part +rd /s /q "%localappdata%\Packages\windows.immersivecontrolpanel_cw5n1h2txyewy" +robocopy /e "C:\Users\Administrator\AppData\Local\Packages\windows.immersivecontrolpanel_cw5n1h2txyewy" "%localappdata%\Packages\windows.immersivecontrolpanel_cw5n1h2txyewy" +echo Done. +pause +exit diff --git a/Fix work file not createable.bat b/Fix work file not createable.bat index 09f466b07292b1175b9d8e895ead9854770292e6..d99763f9089a327cb191800e39b69aabc494cab3 100644 --- a/Fix work file not createable.bat +++ b/Fix work file not createable.bat @@ -1,19 +1,19 @@ @echo off REM Ensure Admin rights -:init setlocal DisableDelayedExpansion set "batchPath=%~0" for %%k in (%0) do set batchName=%%~nk set "vbsGetPrivileges=%temp%\OEgetPriv_%batchName%.vbs" setlocal EnableDelayedExpansion - -:checkPrivileges -NET FILE 1>nul 2>nul -if '%errorlevel%' == '0' ( goto gotPrivileges ) else ( goto getPrivileges ) +net file 1>nul 2>nul +if '%errorlevel%' == '0' (goto gotPrivileges) else (goto getPrivileges) :getPrivileges if '%1'=='ELEV' (echo ELEV & shift /1 & goto gotPrivileges) - +REM If you have non-ASCII chars in your path you'll need to set the codepage appropriate to your locale: +REM chcp 1252 +REM (ANSI-Latin1 - Western European, e.g. German) +cls echo Set UAC = CreateObject^("Shell.Application"^) > "%vbsGetPrivileges%" echo args = "ELEV " >> "%vbsGetPrivileges%" echo For Each strArg in WScript.Arguments >> "%vbsGetPrivileges%" @@ -21,7 +21,7 @@ echo args = args ^& strArg ^& " " >> "%vbsGetPrivileges%" echo Next >> "%vbsGetPrivileges%" echo UAC.ShellExecute "!batchPath!", args, "", "runas", 1 >> "%vbsGetPrivileges%" "%SystemRoot%\System32\WScript.exe" "%vbsGetPrivileges%" %* -exit /B +exit :gotPrivileges if '%1'=='ELEV' (del "%vbsGetPrivileges%" 1>nul 2>nul & shift /1) @@ -39,8 +39,8 @@ reg delete "HKCR\CLSID\{65235197-874B-4A07-BDC5-E65EA825B718}" /f reg delete "HKCR\CLSID\{00020827-0000-0000-C000-000000000046}" /f echo. echo Creating needed folders. . . -mkdir "%USERPROFILE%\AppData\Local\Microsoft\Windows\INetCache\Content.Word" -mkdir "%USERPROFILE%\AppData\Local\Microsoft\Windows\INetCacheContent.Word" +mkdir "%USERPROfile%\AppData\Local\Microsoft\Windows\INetCache\Content.Word" +mkdir "%USERPROfile%\AppData\Local\Microsoft\Windows\INetCacheContent.Word" echo. echo Defining new registry entries for chache path. . . reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "Cache" /t REG_SZ /d "%userprofile%\AppData\Local\Microsoft\Windows\INetCache" /f diff --git a/README.md b/README.md index e739597a39657694a0ad89a09b985e2035293b7a..372cfe8e02e37731c6fccb0bdb7d8b01c0491a10 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,15 @@ A collection of scripts to fix various errors cropping up in Windows.\ These are made for running via double-clicking the scripts in file explorer. +* `Disable Cortana & start menu Bing search.reg` disables the use of Cortana and the start menu searching on the internet via Bing for all users. * `Fix Outlook Temp folder.bat` empties the Temp folder of MS Office Outlook to fix it filling up the main harddrive. -* `Fix blank icons` fixes desktop icons appearing as blank white rectangles instead of their usual icon. Adapted from the [ElevenForums](https://www.elevenforum.com/t/rebuild-icon-cache-in-windows-11.2049/) ([Archived Version](https://web.archive.org/web/20211017173532/https://www.elevenforum.com/t/rebuild-icon-cache-in-windows-11.2049/)) +* `Fix blank icons` fixes desktop icons appearing as blank white rectangles instead of their usual icon. Adapted from the [ElevenForums](https://www.elevenforum.com/t/rebuild-icon-cache-in-windows-11.2049/) [[Archived link](https://web.archive.org/web/20211017173532/https://www.elevenforum.com/t/rebuild-icon-cache-in-windows-11.2049/)] * `Fix edgegdi.dll.bat` fixes the `edgegdi.dll` not being available for certain tasks, leading to errors thrown. * `Fix long login times.bat` deletes `WebCache`and `WebCacheLock.dat` on all normal users to fix unbearable login times after installing windows through a custom made image. * `Fix printer installation error 0x00000bcb.bat` adds a temporary registry hack to fix error 0x00000bcb during printer install, then removes it again afterwards. * `Fix printer not install- and selectable.bat` fixes a problem where no printer can be selected or even installed, caused by corrupted files. * `Fix prompt for password change.bat` disables the prompting for a password change when using a Microsoft account. -* `Fix search & settings.bat` fixes the windows search and the settings app not starting up correctly and freezing. +* `Fix search and settings.bat` fixes the windows search and the settings app not starting up correctly and freezing. * `Fix winmail.dat - Disable RTF & TNEF.reg` fixes the receiver of an email getting a `winmail.dat` file as attachment instead of a normal file by introducing a registry fix to keep Outlook from ever sending emails in RTF format or TNEF encryption. * `Fix work file not createable.bat` fixes the "Could not create the work file" error in Office. * `Remove Java remains.bat` removes remains of a Java installation after uninstall. diff --git a/Remove Java remains.bat b/Remove Java remains.bat index faae327bf028b7a0ee1bd02ebb9982dad7c13ef4..479270ae675ed899afcafdc10dc18ff6b9c8847d 100644 --- a/Remove Java remains.bat +++ b/Remove Java remains.bat @@ -1,19 +1,19 @@ @echo off REM Ensure Admin rights -:init setlocal DisableDelayedExpansion set "batchPath=%~0" for %%k in (%0) do set batchName=%%~nk set "vbsGetPrivileges=%temp%\OEgetPriv_%batchName%.vbs" setlocal EnableDelayedExpansion - -:checkPrivileges -NET FILE 1>nul 2>nul -if '%errorlevel%' == '0' ( goto gotPrivileges ) else ( goto getPrivileges ) +net file 1>nul 2>nul +if '%errorlevel%' == '0' (goto gotPrivileges) else (goto getPrivileges) :getPrivileges if '%1'=='ELEV' (echo ELEV & shift /1 & goto gotPrivileges) - +REM If you have non-ASCII chars in your path you'll need to set the codepage appropriate to your locale: +REM chcp 1252 +REM (ANSI-Latin1 - Western European, e.g. German) +cls echo Set UAC = CreateObject^("Shell.Application"^) > "%vbsGetPrivileges%" echo args = "ELEV " >> "%vbsGetPrivileges%" echo For Each strArg in WScript.Arguments >> "%vbsGetPrivileges%" @@ -21,14 +21,15 @@ echo args = args ^& strArg ^& " " >> "%vbsGetPrivileges%" echo Next >> "%vbsGetPrivileges%" echo UAC.ShellExecute "!batchPath!", args, "", "runas", 1 >> "%vbsGetPrivileges%" "%SystemRoot%\System32\WScript.exe" "%vbsGetPrivileges%" %* -exit /B +exit :gotPrivileges if '%1'=='ELEV' (del "%vbsGetPrivileges%" 1>nul 2>nul & shift /1) REM Functional part -del "C:\Program Files (x86)\Common Files\Java\*" /s /q /f +rd /s /q "C:\Program Files (x86)\Common Files\Java\" +rd /s /q "C:\Program Files\Common Files\Java\" reg query hklm\software\classes\installer\products /f "java(tm) 7" /s | find "HKEY_LOCAL_MACHINE" > deljava.txt for /f "tokens=* delims= " %%a in (deljava.txt) do reg delete %%a /f del deljava.txt