Archive: Insert Date into Registry


Insert Date into Registry
What I am trrying to do is when ever someone runs the EXE I created, I am trying to figure out how to insert the current time and date into the registry when the application was installed?

I thought I could use "WriteRegStr" but I am having problems. Can some please help?


Use deguix's GetLocalTime function for date and time.

Example:

Call GetLocalTime 
Pop $R0 ;Variable (for year)
Pop $R1 ;Variable (for month)
Pop $R2 ;Variable (for day)
Pop $R3 ;Variable (for day of week name)
Pop $R4 ;Variable (for hour)
Pop $R5 ;Variable (for minute)
Pop $R3 ;Variable (for seconds)

WriteRegStr HKLM "Software\MyApp" "InstallDate" "$R2/$R1/$R0, @ $R5:$R4"


-Stu