Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to log the installation date to the registry

Tags:

wix

wix3

When an install completes successfully, the date and time and some other info needs to be written to the registry. How can a date be generated and how do you know if an install was completed successfully? (writing to the registry with wix is not a problem).

like image 793
MX4399 Avatar asked Apr 19 '10 07:04

MX4399


2 Answers

What about using standard MSI properties Date and Time?

Note: Be warned that despite the documentation indicating the date will always be in the MM/DD/YYYY format, this is not in fact the case. A verbose MSI log on my system (in Australia) shows the property in DD/MM/YYYY format... e.g.:

Property(S): Date = 21/04/2010
like image 93
Yan Sklyarenko Avatar answered Oct 07 '22 16:10

Yan Sklyarenko


For date time both, hear is sample code.

<RegistryValue Id="InstallDateTime"
               KeyPath="yes"
               Name="InstallDateTime"
               Value='[Date] [Time]'
               Type="string" />

enter image description here

if you want to use separator you simply add as text like..

<RegistryValue Id="InstallDateTime"
               KeyPath="yes"
               Name="InstallDateTime"
               Value='[Date]-[Time]'
               Type="string" />

enter image description here

like image 42
Rikin Patel Avatar answered Oct 07 '22 17:10

Rikin Patel