I read your previous post about customizing the Windows Media Center Start menu in Windows Vista. I would like to create an MSI that calls RegisterMceApp to register my application and also set the TimeStamp registry values to control the order of the tiles in my custom strip. How can I accomplish this in an MSI? Will I need to create a custom action to update the TimeStamp registry values (because they are created when I run RegisterMceApp)?
You can use the InstallExecuteSequence table of the MSI to control the ordering of the actions to avoid needing a custom action to update the TimeStamp registry values. The easiest way to accomplish this is to use something similar to the example that I posted in this article describing how to use WiX to build an MSI for a Media Center application.
In the example WiX source file described in that article, the custom actions to run RegisterMceApp are sequenced to appear immediately after the InstallFiles action. The only dependency that RegisterMceApp has is that the XML file it uses already be installed on the system, which will happen during the InstallFiles action.
As a result of this sequencing logic, when you build your MSI and look at the InstallExecuteSequence table in Orca, you will see that the RegisterMceApp custom actions appears in between the InstallFiles action and the WriteRegistryValues action. This will cause RegisterMceApp to create an initial set ofTimeStamp values. Then you can override the initial TimeStamp values by creating alternate registry values in the Registry table of your MSI.