Solved

searching file

Posted on 2000-04-07
9
177 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
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

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…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

840 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