tags:

views:

192

answers:

2

Hello Friends, I have developed customized setup Installer using NSIS. But every time when I reinstall an application, I want to take backup of old database files. & backup file should be rename as 'currentdatetime'(ex: 201003101140 means 2010-03-10 at 11:40 AM). please, Help me soon I am waiting your reply

Thanks !

A: 
System::Call '*(&i2,&i2,&i2,&i2,&i2,&i2,&i2,&i2)i.s'
System::Call /NOUNLOAD 'kernel32::GetLocalTime(isr0)'
System::Call '*$0(&i2.r1,&i2.r2,&i2,&i2.r3,&i2.r4,&i2.r5,&i2,&i2)'
System::Free $0
IntFmt $1 "%0.4d" $1
IntFmt $2 "%0.2d" $2
IntFmt $3 "%0.2d" $3
IntFmt $4 "%0.2d" $4
IntFmt $5 "%0.2d" $5
DetailPrint "datetime=$1$2$3$4$5"
Anders
A: 

These macros might work for you: http://nsis.sourceforge.net/Docs/Chapter5.html#5.2.3

KZ