PDA

View Full Version : How to find out if a DLL exists and registered? And if exists, ...



kenhuie
01-29-2002, 11:59 AM
Hi,

I am new with InstallShield Professional 5.5. I would like to know how to find out if a DLL exists and registered on a system. If it exists and registered, how to get the new DLL to be copied to the same location as the existing DLL? If it doesn't exist, just copy the new DLL to the location set by the installer.

Any help is greatly appreciated!!!

Thanks in advance,
Ken

Jörg Hoffmann
01-30-2002, 04:31 AM
Hi Ken,

I think I'm looking for the same problem.

If you know the folder where the file should be stored you can use "VerGetFileVersion()" or "FindFile()".

But I don't know how to find out if it is registered.

Example for VerGetFileVersion():



// Get file version
nResult = VerGetFileVersion(WINSYSDIR ^ "ActXPrxy.dll", svVersion );

if( nResult = FILE_NO_VERSION ) then
// --- version info not found ---
bFound = TRUE;
svVersion = "";
elseif( nResult = FILE_NOT_FOUND ) then
// --- file not found -----------
bFound = FALSE;
svVersion = "";
else
bFound = TRUE;
endif;


Please let me know if you solved this problem.
I'm looking for solutions for Windows Socket 2.0 and ActxPrxy.dll.

THX
Joerg

kenhuie
01-30-2002, 04:50 PM
Hi Joerg,

Thanks so much for the help. At least, my problem is now half-solved.

Thanks again,
Ken

kenhuie
01-31-2002, 05:57 PM
Hi Joerg or All,

What if the dll can be located anywhere on the system? Is there any way to find that out and then copy the new dll to that very same location?

Thanks so much!!!

Ken

Jörg Hoffmann
01-31-2002, 11:59 PM
Hi Ken !

Have a look at this:

http://community.installshield.com/showthread.php?s=&postid=91761#post91761

There I've posted a function to find a file on all drives of your computer.

See the IS help for details on how to copy files to other directories then the usual TARGETDIR.


HTH
Joerg
:)