Windows Installer changing file last modified dates
So I create开发者_开发技巧d a windows installer to deploy a variety of dlls, batch files, and config files. The problem is that for some reason after the files are installed on the system their last modified dates are all changed to the time the installer deployed them.
This is a problem because the system the files will be installed to is validated and it is important the modified dates are as accurate as possible. Has anyone seen this behavior before from Windows Instalers? Is this standard behavior of Windows Installers, or did I do something wrong?
Thanks in advance.
This happens because a package installs copies of your files, it doesn't install your actual files. So when a copy is created, it's last modified date is the same as the creation date (when it was copied).
An installed application shouldn't rely on the modified date of it's files. This is why most of them use configuration files or registry entries. For example you could save these dates in a file when creating the package.
I found MSI files work modifiying the dates when they are created with Visual Studio 2010.
But MSI work as expected (mantaining the dates) when they are created with Visual Studio 2005.
I think that the old mode that maintains information is better. I can not reproduce it with VS2010.
精彩评论