Plug-in and third party software discussion.
-
kaifuzi
- Posts: 19
- Joined: Thu May 30, 2019 12:53 am
Post
by kaifuzi » Wed Jan 20, 2021 10:40 pm
Code: Select all
'Becuase Everything has two mode, admin mode and service mode. For service mode, there is Everything.exe service, I use commandline<>null to skip it in query
Dim everythingProcessCount As Integer = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2").ExecQuery("select * from win32_process where name='EVERYTHING.EXE' and commandline<>null").Count
If everythingProcessCount < 1 Then
'Start Everything.
End If
This is what I'm using. But is there other good approach to know Everything is running or not? And separate Everything service and client.
Thanks!
-
void
- Site Admin
- Posts: 6085
- Joined: Fri Oct 16, 2009 11:31 pm
Post
by void » Wed Jan 20, 2021 10:51 pm
To determine if the Everything client is running or not:
Code: Select all
dim hWndEverything as long
hWndEverything = FindWindow("EVERYTHING_TASKBAR_NOTIFICATION", vbNullString)
If hWndEverything then
' Everything is running
Else
' Everything is not running
' Launch Everything.exe and wait for
' EVERYTHING_IPC_CREATED message
End If
https://www.voidtools.com/support/everything/sdk/ipc_c_example/
-
kaifuzi
- Posts: 19
- Joined: Thu May 30, 2019 12:53 am
Post
by kaifuzi » Wed Jan 20, 2021 11:23 pm
Thanks!I will test this approach and back to here.
-
kaifuzi
- Posts: 19
- Joined: Thu May 30, 2019 12:53 am
Post
by kaifuzi » Thu Jan 21, 2021 8:53 pm
After try your code, it works well, thanks!