Old 28th February 2005, 15:19   #1
Junior Member
Join Date: Feb 2005
Posts: 1
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?
mmcfetridge is offline   Reply With Quote
Old 28th February 2005, 16:28   #2
Afrow UK
Afrow UK's Avatar
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Use deguix's GetLocalTime function for date and time.

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"

Afrow UK is offline   Reply With Quote
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump