I am have created a fixlet that detects if a file is from a certain date/time and based on that relevance, I can then copy the newer file over this one. The problem I am having is that I have a backout fixlet (just in case I need to revert back to the original file) that also uses modification time.
1st fixlet determines if a file is dated less than and if so, become relevant.
2nd fixlet determines if a file is dated greater than and if so, become relevant.
The problem is that depending on when the file is deployed, the modification time changes. If I use today as my benchmark, and then deploy the file in 1 week, the modification time is dated at that time (1 week from now).
Is there a better way to determine this. I tried using creation time but that date also changes depending on when the file was originally installed.
I am using this fixlet for Oracle’s TNSNAMES.ORA file.
For the second Fixlet, you are only trying to detect if the original Fixlet has been deployed, correct? If so, you might set a flag in the first Fixlet and then use that to trigger the first Fixlet, so:
1st fixlet determines if a file is dated less than and if so, become relevant AND action sets registry value that indicates that file was replaced.
2nd fixlet determines if a if registry value was set and if so, become relevant (and action will clear the registry flag).
Second approach:
When you deploy the updated file, try to deploy it in a zipped format (an easy way to do this is to use the software distribution wizard and have it package a folder for you with the file in it). Using this method, the modification date of the file will not change when it is downloaded.