FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Link-date/time
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
Link-date/time
Posted: Mon Oct 06, 2008 10:33 AM

Hello,

Is there a possibility to retrieve the date/time of the exe when it was created. I know I can retrieve the date of a file with the lfndirectory() function, but I was wondering if there is an internal function to retrieve this.

Thanks,
Marc

Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Link-date/time
Posted: Mon Oct 06, 2008 12:57 PM
Mark

I use directory() .. you will have to look at the documentation to see what element represents the time ..

//-- get date stamp on .exe //

cFILE := GetModuleFileName( GetInstance() )
aDIR  := DIRECTORY( cFILE )
dEXE  := aDIR[1] [3]
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
Link-date/time
Posted: Mon Oct 06, 2008 05:21 PM

Rick,

That's how I also do it now, but I was wondering if there was other function because sometime Windows change the Date/time after copying the file...

Marc

Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Link-date/time
Posted: Mon Oct 06, 2008 06:54 PM

Marc,

I was recently reviewing how to set a build number into the EXE, in an automatic way.

You could use a FILEVERSION resource information (please review FWH\samples\FileVer.prg). There you could write down the date and time of the build.

Another interesting way is to call a batch file that creates a file with the date and time and such file is included from the main RC file (#include ... ) so you can retrieve them at runtime using LoadString(). Please review fwh\samples\TestStr3.prg

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
Link-date/time
Posted: Mon Oct 06, 2008 08:34 PM

Thanks Antonio,

That's a good solution. I already do something like that to create a setup-file for INNOSETUP.

Regards,
Marc

Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite

Continue the discussion