billym
2nd May 2003 22:25 UTC
Calling GetSystemTime API?
can someone assist me in the proper way to call the GetSystemTime API within NSIS.
Ex.
!define PATCHEXE "TimeApp.exe"
OutFile ${PATCHEXE}
Name "Time Demo"
Section GetSystemDateTime
System::Call 'kernel32::GetSystemTime(??????????????????
MessageBox MB_OK ??????????????????
SectionEnd
kichik
2nd May 2003 22:50 UTC
Not tested, but it should work:
System::Alloc 128
Pop $0
System::Call "Kernel32::GetSystemTime(i) v (r0)"
System::Call "*$0(&i2 .r1, &i2 .r2, &i2 .r3, &i2 .r4, \
&i2 .r5, &i2 .r6, &i2 .r7, &i2 .r8)"
System::Free $0
DetailPrint "Year: $1"
DetailPrint "Month: $2"
DetailPrint "Day of the week: $3"
DetailPrint "Day: $4"
DetailPrint "Hour: $5"
DetailPrint "Minutes: $6"
DetailPrint "Seconds: $7"
DetailPrint "Milliseconds: $8"
This is a tweaked version of:
http://nsis.sourceforge.net/archive/...ances=0,32,135
billym
2nd May 2003 23:01 UTC
This seems to be returning all zero's
kichik
2nd May 2003 23:02 UTC
Try now, I have edited it.
billym
2nd May 2003 23:06 UTC
Works great, thanks