Archive: transform a date


transform a date
Hi,

I need some help with a transforming problem:

My installer should read the file date from an exe-file on the end of the Installation (.onInstSuccess).
The date must be in this form: YYYYMMDD
How to transform the date?
After this the Installer have to write this
transformed date to a registry-value (WriteRegStr).

Thanks for help.


-timecop


(I'm using NSIS2 current CVS)


Use StrCpy, see documentation for details.


I will try, thanks.


OK, I read the documentation and a lot of stuff in the forum.
But I don't know, how to make a date like 20031010 form the DWORD-Values by GetFileTime.

Any ideas? I'm thankful for every solution.

-timecop


This should do it:

GetFileTime F:\Temp\bla.nsi $1 $0
System::Int64Op $1 * 0x100000000
Pop $1
System::Int64Op $1 + $0
Pop $0
System::Call "*(&i2, &i2, &i2, &i2, &i2, &i2, &i2, &i2) i .r1"
System::Call "Kernel32::FileTimeToSystemTime(*l r0, i r1)"
System::Call "Kernel32::GetDateFormatA(i 0, i 0, i r1, t 'yyyyMMdd', t .r0, i ${NSIS_MAX_STRLEN})"


Hi kichik,

works fine. I'm happy.
Thank you. You're the best.

-timecop