You can do it by specifying only the file types you do want to search.
For example if you wanted to search for EXE and INF files containing
the word "fred", in the search window - "All or part of a file name",
enter "fred.exe,fred.inf" (without quotes).