Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to know if EXPLORER.EXE is running ?

Posted on 1998-10-26
5
Medium Priority
?
488 Views
Last Modified: 2009-07-29
I want to know if the user has thrown one or more executions of EXPLORER.EXE application.
The EnumProcesses/OpenProcess fonctions from PSAPI.DLL gives me all the running processes inluding EXPLORER.EXE, but I can't differentiate it from the Explorer's windows opened by the user.
Could someone give me some help ?
0
Comment
Question by:jcjacquot
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 

Expert Comment

by:dinom
ID: 1176210
I think you should try to enum desktop windows rather than processes.  My hunch is that only one explorer.exe process is going to be running during a users session,  there may however be multiple windows that this process has open, and this seems to be the information you are looking for.  Sound good?
0
 
LVL 2

Expert Comment

by:shchuka
ID: 1176211
Try using GetWindow() and GetWindowText() and then checking for the caption of that window.

-Aleks.
0
 

Expert Comment

by:kahhoe
ID: 1176212
Hi jcjacquot,

Some information for you.  I have run PView by Visual C++.  It seems there is only one Explorer.EXE running.  When I try to open up one additional Explorer.EXE through task bar or start menu, it just increase by one thread.  I guess in all instance, there are only ONE instance of Explorer.EXE.  The rest are just threads.



Best Regards,
Kah Hoe

0
 
LVL 3

Expert Comment

by:danny_pav
ID: 1176213
You can get windows of a single process.  Instead of comparing captions, get the process of explorer.exe and then get the windows associated with that process.
0
 

Accepted Solution

by:
cmihalache earned 200 total points
ID: 1176214
There are two types explorer windows:

* explore (with tree view). You find these windows by calling
FindWindow("ExploreWClass", NULL);

* cabinet (without tree view). You find these windows by calling
FindWindow("CabinetWClass", NULL);

If you wanna find all of them, use EnumWindows and check each window's class.

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question