Added MakeARPInstallDate macro to help create the Add/Remove Programs InstallDate property

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6995 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2018-05-30 21:31:23 +00:00
parent b0430b251b
commit 3e708be352
2 changed files with 10 additions and 0 deletions

View file

@ -48,6 +48,7 @@ RequestExecutionLevel admin
!include "LogicLib.nsh"
!include "Memento.nsh"
!include "WordFunc.nsh"
!include "Util.nsh"
;--------------------------------
;Definitions
@ -844,6 +845,8 @@ Section -post
WriteRegStr HKLM "${REG_UNINST_KEY}" "HelpLink" "http://nsis.sourceforge.net/Support"
WriteRegDWORD HKLM "${REG_UNINST_KEY}" "NoModify" "1"
WriteRegDWORD HKLM "${REG_UNINST_KEY}" "NoRepair" "1"
${MakeARPInstallDate} $1
WriteRegStr HKLM "${REG_UNINST_KEY}" "InstallDate" $1
WriteUninstaller $INSTDIR\uninst-nsis.exe

View file

@ -153,5 +153,12 @@ IntPtrCmpU `${a}` `${b}` `${jeek}` `${jles}` `${jgtr}`
!macroend
!define MakeARPInstallDate "!insertmacro MakeARPInstallDate "
!macro MakeARPInstallDate _outvar
System::Call 'KERNEL32::GetDateFormat(i0x409,i0,p0,t"yyyyMMdd",t.s,i${NSIS_MAX_STRLEN})'
Pop ${_outvar}
!macroend
!endif # !___UTIL__NSH___
!verbose pop