Solved

searching file

Posted on 2000-04-07
9
172 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
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
 
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

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 15 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

744 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now