R_N_WARD
asked on
An Easy VB Question with 90 points
I want to make a setup program that will serch the Hard drive for files already installed. I have the install part done, I just need the command to find the files.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you know the files you are looking for you can do the following:
Dim MyFile, MyPath, MyName
' Returns "WIN.INI" if it exists.
MyFile = Dir("C:\WINDOWS\WIN.INI")
The string MyFile will be filled if the file exists. If it does not exist the string will be null.
Dim MyFile, MyPath, MyName
' Returns "WIN.INI" if it exists.
MyFile = Dir("C:\WINDOWS\WIN.INI")
The string MyFile will be filled if the file exists. If it does not exist the string will be null.
ASKER
Thank you. The Dir$(C:\*.*) command should work fine. Newbe Q> "*.*" is the file I am looking for, right?
you can use *.* or the specfic file you are looking for
http://support.microsoft.com/support/kb/articles/q185/4/76.asp
"PRB: Search Using OpenFile API Instead of Dir/Dir$ Function"
http://support.microsoft.com/support/kb/articles/q168/5/19.asp