Code Monkey home page Code Monkey logo

classicsearch's Introduction

ClassicSearch

In Windows 10 version 1909 Microsoft updated File Explorer search - it is now running in the SearchApp.exe UWP process, which uses EdgeHTML WebView to render the UI, making it too slow to use even on high-end PCs. It also has very poor DPI scaling support, resulting in the bottom input border line gone on focus with fractional scaling factors (125%, 175%, etc.). Also, the search tab in Explorer Ribbon is not visible until you have done at least one search, and the ability to conveniently use advanced search filters is also gone.

Another change related to this was the increase in the height of the address bar of the explorer, which does not look very and not very necessary on devices without touchscreen support.

Unfortunately, the known way to turn off the "modern" search experience by importing some registry keys does not shrink the address bar height, there also haven't been any information on which key to add to disable this in the Open/Save dialogs of 32-bit processes on 64-bit systems.

This project provides a collection of batch files, which can be used to disable or restore "modern" search experience for current or all users - they call reg.exe command to add the needed registry keys, including those ones required for disabling the new search experience in 32-bit processes Open/Save dialogs. Those commands are also published below.

Also, this project contains a fix for the address bar height - it is a COM DLL that registers itself as a shell extension and prevents File Explorer from enlarging the address bar by returning 0 (as it should be) as GetSystemMetricsForDpi result for SM_CYFIXEDFRAME.

You need to have both x86 and x64 Visual C++ Redistributable installed as the DLL depends on it

The distribution which can be downloaded from Releases includes the batch files for installation or disabling the modern search:

  • INSTALL.cmd - install DLL for reducing address bar height and turn off modern search experience
  • UNINSTALL.cmd - install DLL for reducing address bar height and restore modern search experience
  • DisableModernSearch-CurrentUser.cmd - disable modern search experience for current user
  • RestoreModernSearch-CurrentUser.cmd - restore modern search experience for current user
  • DisableModernSearch-AllUsers.cmd - disable modern search experience for current user
  • RestoreModernSearch-AllUsers.cmd - restore modern search experience for current user

It is also possible to have modern search enabled with tiny address bar - just execute RestoreModernSearch-AllUsers.cmd after installation.

If you want to disable modern search only for particular user, but keep tiny address bar, execute RestoreModernSearch-AllUsers.cmd, then DisableModernSearch-CurrentUser.cmd.

Before:
Before

After:
After

Disable or Restore Modern Search Manually

For Current User

Disable new Search Box:

reg.exe add "HKCU\Software\Classes\CLSID\{1d64637d-31e9-4b06-9124-e83fb178ac6e}\TreatAs" /f /ve /t REG_SZ /d "{64bc32b5-4eec-4de7-972d-bd8bd0324537}"
reg.exe add "HKCU\Software\Classes\WOW6432Node\CLSID\{1d64637d-31e9-4b06-9124-e83fb178ac6e}\TreatAs" /f /ve /t REG_SZ /d "{64bc32b5-4eec-4de7-972d-bd8bd0324537}"

Restore new Search Box:

reg.exe delete "HKCU\Software\Classes\CLSID\{1d64637d-31e9-4b06-9124-e83fb178ac6e}" /f
reg.exe delete "HKCU\Software\Classes\WOW6432Node\CLSID\{1d64637d-31e9-4b06-9124-e83fb178ac6e}" /f

For All Users

This commands should be executed as administator.
This also requires you to have write access on some registry keys - scripts from this project take the needed permissions automatically.

Disable new Search Box:

reg.exe add "HKLM\Software\Classes\CLSID\{1d64637d-31e9-4b06-9124-e83fb178ac6e}\TreatAs" /f /ve /t REG_SZ /d "{64bc32b5-4eec-4de7-972d-bd8bd0324537}"
reg.exe add "HKLM\Software\Classes\WOW6432Node\CLSID\{1d64637d-31e9-4b06-9124-e83fb178ac6e}\TreatAs" /f /ve /t REG_SZ /d "{64bc32b5-4eec-4de7-972d-bd8bd0324537}"
reg.exe add "HKLM\Software\WOW6432Node\Classes\CLSID\{1d64637d-31e9-4b06-9124-e83fb178ac6e}\TreatAs" /f /ve /t REG_SZ /d "{64bc32b5-4eec-4de7-972d-bd8bd0324537}"

Restore new Search Box:

reg.exe delete "HKLM\Software\Classes\CLSID\{1d64637d-31e9-4b06-9124-e83fb178ac6e}\TreatAs" /f
reg.exe delete "HKLM\Software\Classes\WOW6432Node\CLSID\{1d64637d-31e9-4b06-9124-e83fb178ac6e}\TreatAs" /f
reg.exe delete "HKLM\Software\WOW6432Node\Classes\CLSID\{1d64637d-31e9-4b06-9124-e83fb178ac6e}\TreatAs" /f

Credits

classicsearch's People

Contributors

krlvm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

classicsearch's Issues

[Windows 10] A way to force the bigger/default address bar height

Hello!

I want to disable the modern bar, but at the same time force the address bar to be wide (as is the default).

From what I understood by reading the project's README (and from other searches I did on the internet), if GetSystemMetricsForDpi returns 8 (apparently the default value) as the result for SM_CYFIXEDFRAME the address bar becomes larger again.

I'm using ExplorerPatcher, but even checking and unchecking the "Shrink address bar height" option, the bar continues to shrink and doesn't change (as seen in the screenshot below).

image

Trying to use ClassicSearch (installing, uninstalling etc.) also doesn't seem to fix my problem.

I know this may be a little outside the scope of the project, but is there a way to force the default behavior (i.e. return 7 to SM_CYFIXEDFRAME from GetSystemMetricsForDpi) while also keeping the modern search bar disabled?

I know that there is some kind of hook (ep_hook or something like that) in ExplorerPatcher to install add-ons in it, but I don't know the specific details and I don't know if it's needed.

I'm on Windows 10 Pro 22H2.

Thanks in advance.

How to compile your custom DLL (ClassicSearch directory)?

I've been trying to compile your DLL with and without changes on it, and it keeps giving me some errors. Could you provide information on what requirements I should fulfill to compile it?

Like this one:

ccTKuGkL.o:dllmain.c:(.text+0x96): undefined reference to `PatchIAT'
collect2.exe: error: ld returned 1 exit status

and the errors in the image below:
image

I've had these issues by using gcc.exe -shared -o ClassicSearch64.dll "ClassicSearch/dllmain.c"

Thanks in advance!

Windows 11: Control Panel doesn't launch

With ClassicSearch installed on the current latest stable build of Windows 11 (22H2 22621.1265), Control Panel will not launch and will instantly close. It does not happen if I uninstall ClassicSearch.

Windows 11 address bar

First of all: Very grateful this is even an option at this point! But I was wondering if there was any chance of making the address bar height lower? I used the basic theme on Windows 11 for better comparison between the themes. If there isn't a way I understand, with the way microsoft is changing things, but was also curious if there was a way?
image

ClassicSearch crashing explorer

ClassicSearch may randomly crashing the shell everytime an explorer window is opened.

Looking at event viewer logs:
image
(In this case, I was editing stuff at Paint.NET and when open/save dialog is opened, both Paint.NET and explorer may randomly crash)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.