简体   繁体   中英

NSIS: Should I overwrite System .dll Files?

I am currently supporting/developing a kind of Legacy System (VC++ 6.0). But that's not really the problem.

The program depends on some old system .dll files, (which I also have).

I have started building a new installer using NSIS, BUT what should I do with the old system .dll files?

Can I somehow determine if the current system files (I'm running Win7), is newer than those from the old program?

I'm not really sure if I should just overwrite the "newer" system files with the old, without checking any "time stamp"?

99% of the time, the answer will be "DON'T overwrite." Windows XP and newer already have the DLL files you need. If these files are critical system files, Windows won't even allow you to overwrite them because of System File Protection.

What I've usually done is use NSIS built in SetOverwrite function to ifnewer (which will - correctly - not touch the DLL files on modern versions of Windows)

Link to SetOverwrite: http://nsis.sourceforge.net/mediawiki/index.php?title=Reference/SetOverwrite

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM