I m trying to port an NSIS installer to WiX. Every time the installer runs it sets a registry key to a new GUID value, so that when my app runs it can see if it s first run after an install. On first run the app sets another registry key to the GUID value from the installer. As long as the two keys match then I know the installer hasn t been run.
Here s the NSIS code:
#Write InstallGUID
Call CreateGUID
Pop $0
WriteRegStr HKLM "${REGKEY}" InstallGUID $0
and
Function CreateGUID
System::Call ole32::CoCreateGuid(g .s)
FunctionEnd
I ve got a fairly complete WiX installer ready at this point, but I can t figure out how to replicate this functionality. Is there something in WiX to generate GUIDs at install time, or do I need to write a custom event? If I could avoid writing a little dll that would be best.