Solved

searching file

Posted on 2000-04-07
9
174 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

867 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

16 Experts available now in Live!

Get 1:1 Help Now