Not indexing all files

Found a bug in "Everything"? report it here
Invariant
Posts: 6
Joined: Wed Apr 09, 2025 3:01 am

Not indexing all files

Post by Invariant »

Not sure if there are any problems or not still as I'll have to test it.

For some reason Everything is not indexing all files. I'm on latest but I've had this problems since I started running everything unelevated:

RUNAS /trustlevel:0x20000 "Everything64.exe -startup"

Which also is run by an UnElevate utility. The entire point of running it unelevated is because if I run pdf's with elevacted everything the pdf viewer(sumatrapdf) becomes elevated then I can't load pdfs in it... or if sumatrapdf gets run unelevated then everything can load pdfs in it.

I believe that everything is likely not indexing because it is unelevated as it says, at least initially, that it requires admin or the service. The service is installed though so I don't know why it is not working.

For example, now I get "Access denied: Install the Everything service or run as administrator to index this volume" on all the NTFS drives. I did not see this before I upgraded(I was on 1394 I think). Again, the service is installed(although I do not technically know if the installer updated it or not and if that matters). Of course I do not get that error when I run it as administrator.



The unelevate code, not originally mine, is given below. It might be possible for you to use this to run verbs or apps unelevated so there is no issue with elevation. Either way, the real issue seems to be why the latest everything version is not using the service(not sure if it simply did not uninstall the previous service so is using an incompatible version).

I did uncheck the "Everything service" in the options and it seems to uninstall the service... I then checked it again and it installed it.

Code: Select all

#define STRICT
#define UNICODE
#define _UNICODE
#include <windows.h>
#include <shldisp.h>
#include <shlobj.h>
#include <exdisp.h>
#include <atlbase.h>
#include <stdlib.h>
#include <shlwapi.h>
#include <atlalloc.h>
#include <stdio.h>

class CCoInitialize {
public:
    CCoInitialize() : m_hr(CoInitialize(NULL)) {}
    ~CCoInitialize() { if (SUCCEEDED(m_hr)) CoUninitialize(); }
    operator HRESULT() const { return m_hr; }
    HRESULT m_hr;
};



// FindDesktopFolderView incorporated by reference
void FindDesktopFolderView(REFIID riid, void** ppv)
{
    CComPtr<IShellWindows> spShellWindows;
    spShellWindows.CoCreateInstance(CLSID_ShellWindows);

    CComVariant vtLoc(CSIDL_DESKTOP);
    CComVariant vtEmpty;
    long lhwnd;
    CComPtr<IDispatch> spdisp;
    spShellWindows->FindWindowSW(
        &vtLoc, &vtEmpty,
        SWC_DESKTOP, &lhwnd, SWFO_NEEDDISPATCH, &spdisp);

    CComPtr<IShellBrowser> spBrowser;
    CComQIPtr<IServiceProvider>(spdisp)->
        QueryService(SID_STopLevelBrowser,
            IID_PPV_ARGS(&spBrowser));

    CComPtr<IShellView> spView;
    spBrowser->QueryActiveShellView(&spView);

    spView->QueryInterface(riid, ppv);
}



void GetDesktopAutomationObject(REFIID riid, void** ppv)
{
	CComPtr<IShellView> spsv;
	FindDesktopFolderView(IID_PPV_ARGS(&spsv));
	CComPtr<IDispatch> spdispView;
	spsv->GetItemObject(SVGIO_BACKGROUND, IID_PPV_ARGS(&spdispView));
	spdispView->QueryInterface(riid, ppv);
}

void ShellExecuteFromExplorer(
    PCWSTR pszFile,
    PCWSTR pszParameters = nullptr,
    PCWSTR pszDirectory = nullptr,
    PCWSTR pszOperation = nullptr,
    int nShowCmd = SW_SHOWNORMAL)
{
    CComPtr<IShellFolderViewDual> spFolderView;
    GetDesktopAutomationObject(IID_PPV_ARGS(&spFolderView));
    CComPtr<IDispatch> spdispShell;
    spFolderView->get_Application(&spdispShell);
    CComQIPtr<IShellDispatch2>(spdispShell)
        ->ShellExecute(CComBSTR(pszFile),
            CComVariant(pszParameters ? pszParameters : L""),
            CComVariant(pszDirectory ? pszDirectory : L""),
            CComVariant(pszOperation ? pszOperation : L""),
            CComVariant(nShowCmd));
}

int __cdecl wmain(int argc, wchar_t** argv)
{
    if (argc < 2) return 0;
    CCoInitialize init;
    ShellExecuteFromExplorer(
        argv[1],
        argc >= 3 ? argv[2] : L"",
        argc >= 4 ? argv[3] : L"",
        argc >= 5 ? argv[4] : L"",
        argc >= 6 ? _wtoi(argv[5]) : SW_SHOWNORMAL);
    return 0;
}


void
Developer
Posts: 19899
Joined: Fri Oct 16, 2009 11:31 pm

Re: Not indexing all files

Post by void »

Everything should not be running elevated.

Everything should run as a standard user.
Everything will use the Everything Service to index and monitor NTFS volumes.

Please make sure Everything is installed correctly and running as a standard user:
  • In Everything, from the Tools menu, click Options.
  • Click the General tab on the left.
  • Check Store settings and data in %APPDATA%\Everything.
  • Uncheck Run as administrator.
  • Check Everything Service. (Please make sure this is tick-checked and not square-checked)
  • Click OK.
  • Exit Everything (from the File menu, click Exit).
  • Restart Everything.
Invariant
Posts: 6
Joined: Wed Apr 09, 2025 3:01 am

Re: Not indexing all files

Post by Invariant »

void wrote: Fri Feb 06, 2026 6:48 am Everything should not be running elevated.

Everything should run as a standard user.
Everything will use the Everything Service to index and monitor NTFS volumes.

Please make sure Everything is installed correctly and running as a standard user:
  • In Everything, from the Tools menu, click Options.
  • Click the General tab on the left.
  • Check Store settings and data in %APPDATA%\Everything.
  • Uncheck Run as administrator.
  • Check Everything Service. (Please make sure this is tick-checked and not square-checked)
  • Click OK.
  • Exit Everything (from the File menu, click Exit).
  • Restart Everything.
Works: Everything.exe
Fails: Everything.exe -instance "Main"

That is, there is no Access denied error in the first. Why is using -instance "Main" causing the access denied error which basically means it is not detecting the service? Do we have to install a service per instance? None of this was using administrator to run Everything.

Clearly: If I run Everything from a non-elevated prompt then goto options and look at the NTFS drives they all do not show the access denied error. If I run Everything with the-instance flag they do show it.
therube
Posts: 5727
Joined: Thu Sep 03, 2009 6:48 pm

Re: Not indexing all files

Post by therube »

Do we have to install a service per instance?
No.

Typically one installs Everything, & the Service gets installed, & the GUI itself runs at a "standard" user level (not elevated).
Running Everything from a non-elevated prompt, should still just work, should be using the service, should see all your files.
Running separate instances (even simultaneous separate instances) should just work, should be using the service, should see all your files.

Other instances should simply uses the existing, already installed service.
That said, note: Everything Service Disconnected.
therube
Posts: 5727
Joined: Thu Sep 03, 2009 6:48 pm

Re: Not indexing all files

Post by therube »

The entire point of running it unelevated is because if I run pdf's with elevacted everything the pdf viewer(sumatrapdf) becomes elevated then I can't load pdfs in it... or if sumatrapdf gets run unelevated then everything can load pdfs in it.
Under normal circumstances, both Everything & SumatraPDF should be running at a standard user level (not elevated), so should allow you to open pdf's in Sumatra.


(Now, if you have to elevate one or the other - because otherwise you cannot access a particular .pdf, like owned by a different user, that is a different matter.)


Is UAC enabled on your end?
Is the user that you're logged in as, a "Standard user" account (rather then "Administrator")?
Invariant
Posts: 6
Joined: Wed Apr 09, 2025 3:01 am

Re: Not indexing all files

Post by Invariant »

viewtopic.php?t=6806
viewtopic.php?p=76252

That is the issue I'm having.

https://www.voidtools.com/support/every ... g_service/
https://www.voidtools.com/support/every ... _instances

I think I was confused or read something incorrect. We do not have one service per instance? We only need once service which all instances connect to. By default they all connect to the default name service but one can change this if they want for some reason?

"
Everything 1.5 only needs one service for all instances.
The Service name is still hard coded as "\\\\.\\PIPE\\Everything 1.5a Service"
(unless you specify -service-pipe-name)
"

The question is, what are the named pipes for then?

Also, what likely caused all this is that I installed service using a named pipe and then when I upgraded recently and reinstalled the service it changed to the default name breaking the service connection I hard coded into my instances causing the "access denied" error.

This may or may not solve the original problem with files not being indexed without rebuilding but that might take some time to discover.
Last edited by Invariant on Fri Feb 06, 2026 11:05 pm, edited 5 times in total.
void
Developer
Posts: 19899
Joined: Fri Oct 16, 2009 11:31 pm

Re: Not indexing all files

Post by void »

We do not have one service per instance? We only need once service which all instances connect to.
Everything 1.4: Requires a service for each instance.
Everything 1.5: Only one service is required.


By default they all connect to the default name service but one can change this if they want for some reason?
There's no good reason to change the service name in Everything 1.5.
It might have been useful in Everything 1.4 to share the service between multiple instances.
So the option comes from Everything 1.4, and its not really relevant any more. I'll look into depreciating this option.
Technically, the early versions of Everything 1.5a also required a service for each instance.


The question is, what are the named pipes for then?
The Everything GUI communicates with the Everything Service over a named pipe.


Also, what likely caused all this is that I installed service using a named pipe and then when I upgraded recently and reinstalled the service it changed to the default name breaking the service connection I hard coded into my instances causing the "access denied" error.
Help -> Troubleshooting information -> Service can give a little more information about the service status.
If there's no connection at all, then something isn't configured correctly.
Changing the service named-pipe name can cause this.
If Everything is not showing a connection, I would uninstall and reinstall Everything at this stage, avoid changing the service named-pipe name for both the GUI and the Everything service.
-or-
Check your GUI-side service pipe name under Tools -> Options -> Advanced -> service_pipe_name
(make sure its blank)
Check the service-side service pipe name under regedit ->
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Everything (1.5a)
->
ImagePath

Remove:
-svc-pipe-name <PIPENAME>

(if it is included)
Restart the Everything Service

More information about connection failures can be found in your debug log:
From the Tools menu, under the Debug submenu, click Start Debug Logging...
From the Help menu, click Troubleshooting information.
Close the Troubleshooting information page.
From the Tools menu, under the Debug submenu, click Stop Debug Logging...
---This will open your Everything Debug Log.txt in Notepad.
Please upload this file in a bug report
This log will capture any errors when connecting to the Everything Service.
Showing the troubleshooting information page will trigger a service connection.



Note: The instance name has nothing to do with the Everything Service named-pipe name.



-svc-pipe-name
-install-service-pipe-name
-service-pipe-name
service_pipe_name
Invariant
Posts: 6
Joined: Wed Apr 09, 2025 3:01 am

Re: Not indexing all files

Post by Invariant »

Ok, probably the biggest confusion was the version relation to services. I think I setup things at 1.4 then soon after switched to 1.5 so probably was still thinking about 1.4. Everything seems to be working on my end best I can tell.

Thanks. It's a great app!

Also, seems to be working fine using RUNA as an unelevate stuff I originally posted just in case anyone needs something like it.