dllupdate.exe

This is a commandline utility installed as part of pkg-msvcrt that can be used to install dlls into \windows\system32 with logic for version testing. The source is available in svn ( http://svn.osgeo.org/osgeo4w/trunk/utils/dllupdate.cpp), and it is maintained by FrankWarmerdam.

Usage: dllupdate.exe [-q] [-oite] [-copy] source_dll [target_directory]

 -q: quiet
 -oite: only copy if target dll exists
 -copy: enable copy/update (default is info only)
 source_dll: The full path to the source dll
 target_directory: path to target dir, default is C:\windows\system32

The normal use is in a post install script, like the one for pkg-openssl:

dllupdate -q -oite -copy %OSGEO4W_ROOT%\bin\libeay23.dll
dllupdate -q -oite -copy %OSGEO4W_ROOT%\bin\ssleay23.dll

The source DLL is given, with the -copy switch to enable copying (without it the program just provides version information). The -oite switch used here indicates that the dll should only be copied to \windows\system32 if there is already a dll there. The normal behavior is to test the version of the source dll and the version of the target dll and only replace the target dll if it is an older version.

If the \windows\system32 dll is in use, the new dll will be copied with a .new name and will be renamed replacing the target file on system bootup.