Solved

How to know if EXPLORER.EXE is running ?

Posted on 1998-10-26
5
474 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 100 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

739 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