Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date of last compile available somewhere? 1

Status
Not open for further replies.

Hokkie

MIS
Nov 21, 2001
77
NL
Hi,

is there any parameter or property that holds the date of the last compile-run? If I were to compile my application on December 8th, it would say something like '12-08-2003', and if I compile a newer version on December 10th it would automatically change to '12-10-2003', so that it's behavior is similar to that of the Auto Increment feature.

Does anybody know if this is supported in VB6?

Tanx!

Hokje
 
I'm not aware of, for example, any property of the App object that would do this automatically (though I guess you could do it manually by just storing the date in one of the other properties that you don't use - e.g. legaltrademarks).

Alternatively, you could access the .EXE's date created using, for example, the FileSystemObject. Something like:

Set fs = CreateObject("Scripting.FileSystemObject")
Set FileInfo = fs.GetFile(app.exename)

msgbox FileInfo.DateCreated
 
Hi Glasgow,

I tried your code and it works (with an extra DIM statement and an elaboration on the filename:

Dim FileInfo As File
Set fs = CreateObject("Scripting.FileSystemObject")
Set FileInfo = fs.GetFile(App.Path & "\" & App.EXEName & ".exe")

MsgBox FileInfo.DateCreated).

There is just this, though: when I compile over an old version (replacing an old version of app.exe with a new version of app.exe in the same place) I still get the old DateCreated. Hmmm... I could remove the old version and then create the new one. I think that would work convenient enough.

Tanx Glasgow!

members.lycos.nl\mchokke
 
Or perhaps just use DateLastModified instead of DateCreated assuming that changes to a sensible date/time when re-compiling and there is no danger of it being altered by the users.

 
I thought to look in the .vbp file, but no luck. It stores the version number, but not the date it was last built.

Chip H.


If you want to get the best response to a question, please check out FAQ222-2244 first
 
The DateLastModified works better than DateCreated; it changes with every compile.Although not the answer I had hoped I would get, it works for me. A star for Glasgow as you've come up with two simple ideas that did the trick!

Hokje
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top