i need to write in registry the current date, when my app were installed. For this i have created function in [code] section and trying to call it from [registry] section but it doesnt work. How can i call my function from [registry] section to get the value which it returns?
[Registry]
Root: HKLM; Subkey: SOFTWARE\MyAppName; ValueType: string; ValueName: date; ValueData: **{code:DateTime}**; Flags: createvalueifdoesntexist; Tasks: ; Languages:
[Code]
function DateTime() : String;
begin
result := GetDateTimeString('dd/mm/yyyy hh:nn:ss', '-', ':');
end;
You have to declare the function with a string parameter
function DateTime(param: string) : String;
even if it is not used inside the function.
The {code: call allows one string parameter. If you omit it (like you did), an empty string is used.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With