When Searching For Something, Search For Everything

Off-topic posts of interest to the "Everything" community.
therube
Posts: 1595
Joined: Thu Sep 03, 2009 6:48 pm

When Searching For Something, Search For Everything

Postby therube » Wed Sep 21, 2016 8:24 pm

When Searching For Something, Search For Everything


So I "installed" Vim.
Installed into, C:\DEV\VIM\.
Installer actually creates a subdirectory, so things end up at: C:\DEV\VIM\Vim80\.

And I installed both "vim" & "gvim".

Over time I've accumulated various vim.bat & gvim.bat files that I've used to start vim.exe/gvim.exe, & sometimes I'll run the .exe directly.

On a new install, I'll typically move all that "crud" out of the way (back it up somewhere) then compare the newly installed versions of same.

My batch files typically go into, C:\BIN\ (which I include in %PATH%).

So anyhow, I install Vim, then I go about "comparing" (old to new, to see if there are diffs...).
But what I'm not finding is just where (where as in where in my PATH) any Vim related stuff is?
vim.exe & gvim.exe are in, C:\DEV\VIM\vim80.x\vim.exe|gvim.exe, not specifically in a place like my \BIN\ directory, & also not specifically in a location in my PATH.
So I go looking for the (newly created) batch files to compare them.
But those also are not in my \BIN\ directory?

Yet I type vim or gvim, & the programs open.
And I'm like, where in the world is finding vim.exe|gvim.exe?
How is it finding them?

So of course I use Everything to find, vim.bat|vim.cmd|gvim.bat|gvim.cmd|vim.exe|gvim.exe & all that turns up are items that I've backed up, outside of all my "normal" locations (& likewise outside of "normal" locations for Windows too) for that stuff!

And I search through the Windows Registry, maybe something in there?

Code: Select all

HKCR\*\OpenWithList\gvim.exe
HKCR\.htm\OpenWithList\gvim.exe
HKCR\.vim\OpenWithList\gvim.exe
HKCR\Applications\gvim.exe\shell\edit\command      "C:\DEV\VIM\vim80\gvim.exe" "%1"
HKCR\Applications\gvim.exe\shell\open\command      "C:\BIN\gvim.exe" "%1"
HKCU\Software\Classes\Applications\gvim.exe\shell\open\command      "C:\BIN\gvim.exe" "%1"
HKLM\SOFTWARE\Classes\*\OpenWithList\gvim.ex
HKLM\SOFTWARE\Classes\.htm\OpenWithList\gvim.exe
HKLM\SOFTWARE\Classes\.vim\OpenWithList\gvim.exe
HKLM\SOFTWARE\Classes\Applications\gvim.exe\shell\edit\command      "C:\DEV\VIM\vim80\gvim.exe" "%1"

Fine & dandy, but nothing in there should be allowing vim.exe|gvim.exe to run from a command prompt.

Yet they do.
And I check environmental variables, & nothing there helps.
So I execute vim.exe directly, then :! cmd /k.
Then SET, & I (now) see some VIM related variables.
OK, but where did they come from?
Outside of VIM they are not there.

So I rename the Vim instalDir to, C:\DEV\VIM\vim80.X\.
And outside of that directory I type vim|gvim & finally it doesn't work.

Code: Select all

"C:\DEV\VIM\vim80\vim.exe" not found


And I do SET's & ECHO's & this's & that's, & I'm pulling my hair out!
Then I think, well, which.

C:\> which.exe vim.exe, nothing found.
C:\> which.exe gvim.exe, nothing found.

Scratch head some more.

C:\> which.exe vim.bat, & I see, E:\WINDOWS\vim.BAT.
C:\> which.exe gvim.bat, & I see, E:\WINDOWS\vim.BAT.

Slaps head! Oh man!
The installer installed the batch files in a place that is in my PATH, but nowhere where I would have ever used, much less was I even thinking of that.

In my case, Windows is installed on E:, & other then Windows itself, virtually nothing ends up there, so for this to happen was totally unexpected.

AND in everything, I had a filter set, so everything I was search for in Everything was ONLY looking at C:, so I never saw the newly added files on E:.

So... if you're searching for something, & in particular if you're expecting but not finding it, make sure you're searching for everything - sans filters, in Everything :-).

Return to “Off-topic discussion”