简体   繁体   English

NSIS:我应该覆盖系统.dll文件吗?

[英]NSIS: Should I overwrite System .dll Files?

I am currently supporting/developing a kind of Legacy System (VC++ 6.0). 我目前正在支持/开发一种传统系统(VC ++ 6.0)。 But that's not really the problem. 但这不是真正的问题。

The program depends on some old system .dll files, (which I also have). 该程序取决于一些旧系统.dll文件(我也有)。

I have started building a new installer using NSIS, BUT what should I do with the old system .dll files? 我已经开始使用NSIS构建新的安装程序,但是旧系统.dll文件应该怎么办?

Can I somehow determine if the current system files (I'm running Win7), is newer than those from the old program? 我能以某种方式确定当前系统文件(我正在运行Win7)是否比旧程序中的文件新?

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." 在99%的时间里,答案将是“不要覆盖”。 Windows XP and newer already have the DLL files you need. Windows XP和更高版本已具有所需的DLL文件。 If these files are critical system files, Windows won't even allow you to overwrite them because of System File Protection. 如果这些文件是关键系统文件,则由于系统文件保护,Windows甚至不允许您覆盖它们。

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) 我通常要做的是使用内置于SetOverwrite函数中的NSIS到ifnewer(它将-正确-不会接触现代版本Windows上的DLL文件)

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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