ivank
17th May 2002 04:56 UTC
How to update system DLLs?
What is the right way to update system DLLs that are constantly in use, such as mfc42.dll?
Note that I need to update the DLL only if the version of the DLL in my install is newer than the version currently present on the target computer. Comparison by creation date instead of version will probably do too.
SetOverwrite has "ifnewer" mode, but does not have "rebootOK" flag.
"Rename" has "rebootOK" flag, but lacks "ifnewer" mode.
Generally it would be nice to have some kind of "smartReplace" option for overwrite that would do this:
1. Check if taret file already exists.
2. If it does, check creation dates. If target is younger than the source, don't replace.
3. If target is in use, copy source to temporary directory and do rename /rebootOK. Otherwise just replace the target with the source.
I guess this can be done manually for each DLL, but it requires a bunch of commands. And it is even more difficult to put it into a function that takes file name as a parameter and does the rest automatically.
Maybe somebody already wrote such a function? ;)
Please advise.
With best regards
Ivan
kichik
17th May 2002 09:55 UTC
In your functions.html file there is a function that does excatly that, and in the forums there a lot of improvements for it. Search for it.
ivank
17th May 2002 15:20 UTC
What function do you have in mind?
I looked in Functions.html and did not find anything like this.
UpgradeDLL macro comes close, but this is not it. It deals with a COM server DLL, and it won't update it if DLL cannot be overwritten.
Although, that macro gave me some ideas.
kichik
17th May 2002 15:30 UTC
UpgradeDLL on the forums does excatly what you have requested. It checks the version, reaplces if needed, and if needed replaces after reboot.
And functions.html does contain the UpgradeDLL macro.
glenncarr
11th June 2002 22:11 UTC
UpgradeDLL on the forums does excatly what you have requested. It checks the version, reaplces if needed, and if needed replaces after reboot
:weird: What exactly in the macro causes the replacement at reboot? I would have expected something to modify the "Runonce" registry key.
kichik
12th June 2002 14:01 UTC
Hmm.... Nothing :)
The modified macro on the forums does that.
glenncarr
12th June 2002 14:41 UTC
OK, so I'm new to these forums and I apologize for not knowing this... but, is there a central repository in the forums for these updated macros? I.e., where is the latest, most up-to-date version of UpgradeDLL ?
:o
kichik
12th June 2002 14:52 UTC
Just sort the search results by date.
Some people did try to make such centeral repositories but non lasted (as far as I know of...).
glenncarr
12th June 2002 15:16 UTC
One more question... why won't searching for "UpgradeDLL" return any results? :igor:
Am I doing something stupid?
Smile2Me
12th June 2002 17:33 UTC
Try searching for Upgrade and find o.o.
http://forums.winamp.com/showthread....hlight=upgrade
-Hendri.