Old 7th February 2018, 01:59   #1
sfx09
Junior Member
 
Join Date: Jul 2017
Posts: 27
NSIS file modify time

Hello!

I use nsis-3.01-log, compile script from Windows 7 64-bit with bzip2 compressor.

Short question. I add many files in installer (for example):

PHP Code:
;...
File "/oname=my.exe" "D:\!INSTALLER\!cache\my.exe"
File "/oname=my2.exe" "D:\!INSTALLER\!cache\my2.exe"
;... 
But sometimes, rarely, my.exe loses one second from modify filetime after installing!
For example, in "D:\!INSTALLER\!cache\my.exe" - modify time attribute is ‏‎12:37:09, but after unpacking in $INSTDIR (after installing) this file modify time attribute is ‏‎12:37:08 (windows 7 information in "properties").

Theoretically, can NSIS algorithms edit the date or time of files, which packed into the installer?

Thank you for answer. I already broke my head, where do I lose this second. In this case, if I recompile my.exe (just for example, it's can be any other file) - everything is fine before the next similar situation.
sfx09 is offline   Reply With Quote
Old 7th February 2018, 22:13   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,843
Yes, NSIS might modify the time a little bit. The changed time will be <= 4 seconds off the original. This is because FAT32 has a resolution of 2 seconds (DOS time) and we want the "ifnewer" mode to work correctly on these partitions.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 8th February 2018, 00:16   #3
sfx09
Junior Member
 
Join Date: Jul 2017
Posts: 27
Thumbs up

Thank you. =) I made a conditional statements in my code.
sfx09 is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump