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).
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
For date time both, hear is sample code.
<RegistryValue Id="InstallDateTime"
KeyPath="yes"
Name="InstallDateTime"
Value='[Date] [Time]'
Type="string" />
if you want to use separator you simply add as text like..
<RegistryValue Id="InstallDateTime"
KeyPath="yes"
Name="InstallDateTime"
Value='[Date]-[Time]'
Type="string" />
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