Get Everything path via IPC

Discussion related to "Everything" 1.5 Alpha.
Post Reply
err_24546
Posts: 39
Joined: Wed Oct 11, 2023 1:47 am

Get Everything path via IPC

Post by err_24546 »

Hi,
I wonder if it's possible to get the Everything path (the path where Everything exec reside) using the SDK, regardless of whether Everything is portable or installed.
void
Developer
Posts: 16753
Joined: Fri Oct 16, 2009 11:31 pm

Re: Get Everything path via IPC

Post by void »

Not possible with the SDK.

Please try the following:

Get the window handle to the Everything notification window:

HWND everythingTaskbarNotificationWindow = FindWindow("EVERYTHING_TASKBAR_NOTIFICATION",0);


Get the process ID from the window handle:

DWORD everythingProcessId;
GetWindowThreadProcessId(everythingTaskbarNotificationWindow,&everythingProcessId);


Open an Everything process handle:


HANDLE hProcess;

hProcess = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ,FALSE,everythingProcessId);


Get the module filename from the process handle:


char szModName[MAX_PATH];

if ( GetModuleFileNameEx(hProcess,NULL,szModName,sizeof(szModName)))
{
// Do something with the path to Everything.exe
}




Alternatively, you can find the install path in the registry under:
HKEY_LOCAL_MACHINE\SOFTWARE\voidtools\Everything
with the InstallLocation key.



edit:
With Everything 1.5 you can do an IPC search for: whole:about:exe to return the full path and name of your Everything.exe
Post Reply