?
Solved

searching file

Posted on 2000-04-07
9
Medium Priority
?
181 Views
Last Modified: 2012-05-04
How can I know if the person who uses my program has, let's say iexplore.exe on his computer? As I don't know where he could have insatalled it I must search the whole unit 'c:\' for this file, so my question here is how can i do that?

thanks.
0
Comment
Question by:pin_plunder
[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
9 Comments
 
LVL 6

Expert Comment

by:edey
ID: 2695519
you could try running a batch file with the line:

dir c:\iexplore.exe /s/b/p > c:\windows\temp\filesrch.txt

then look in:

c:\windows\temp\filesrch.txt

for a line containing iexplore.exe


GL
Mike
0
 
LVL 1

Expert Comment

by:xpher
ID: 2695837
listening
0
 

Author Comment

by:pin_plunder
ID: 2696649
i'll try, but don't really like the idea, any other suggestions??
0
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!

 
LVL 2

Expert Comment

by:kambiz
ID: 2696738
You could find path of iexplore.exe in registry.

Root: HKEY_LOCAL_MACHINE
Key: Software\Microsoft\IE Setup\SETUP
Name: Path
0
 

Expert Comment

by:mathought
ID: 2696743
Try using findfirst..findnext to scan the drives.
By using findfirst/next for files with attribute of a directory and using ChDir you can recursivly scan through the drive's directories and in each directory use another findfirst..findnext (by calling another function for example) to look for files with the name of the file you are searching for.
Note that such a search can take time. Depending on the file you are looking for it might be better to search only in the PATH or search for a reference to it in the registry.

Hoped it helped...
0
 
LVL 3

Expert Comment

by:Diggie
ID: 2702136
do u want to search for a specific program (like iexplorer.exe) or the default program for a task (like default browser)?
0
 

Author Comment

by:pin_plunder
ID: 2702648
the first thing, but i'm working on it. I'll try to use the windows registry.
0
 

Accepted Solution

by:
johnstoned earned 45 total points
ID: 2711398
There is a registry key

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Current Version\App Paths

there are lots of keys under this, each called by the name of an application installed on your computer.  Each key has a default value (containing the path of the exe and the exe name) and Path which contains the default "run in" directory.

If you look through these keys, you may find what you're looking for.

Dave.
0
 

Author Comment

by:pin_plunder
ID: 2714366
thanks.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses

771 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