Solved

searching file

Posted on 2000-04-07
9
175 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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

776 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