Brett
10-29-2007, 04:01 PM
Here is an answer to that question that is specific to the WriteRegistryValues standard action, but can be applied to any standard action:
There is no way to schedule just one registry action to happen at a specific time. All that you can do is change the sequence of the standard "WriteRegistryValues" action in the InstallExecuteSequence. You can see by opening your MSI file in Orca that by default it is scheduled at sequence 5000. If you want to change that sequence, you can either:
1) Change it by hand using Orca after the MSI is generated.
or
2) Do the following hack...
- Make a text file on your system called "Sequence.wxs"
- Set the contents of this file to be:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment></Fragment>
</Wix>
- Save the file.
- Now in Setup Factory, select Build > Settings from the menu. Go to the Fragments tab.
- Add the Sequence.wxs file on your system to the list of fragment files.
- In the "Main WXS File Insertions" section, add a new Fragment Insertion item with the following settings:
Insertion type: Last Child
Target search string: //InstallExecuteSequence
Text to insert: <WriteRegistryValues Sequence="3600"/>
In the above "3600" is the new sequence number. You can change that to whatever you like.
- Now build and the MSI will have that standard action at the sequence you specified.
There is no way to schedule just one registry action to happen at a specific time. All that you can do is change the sequence of the standard "WriteRegistryValues" action in the InstallExecuteSequence. You can see by opening your MSI file in Orca that by default it is scheduled at sequence 5000. If you want to change that sequence, you can either:
1) Change it by hand using Orca after the MSI is generated.
or
2) Do the following hack...
- Make a text file on your system called "Sequence.wxs"
- Set the contents of this file to be:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment></Fragment>
</Wix>
- Save the file.
- Now in Setup Factory, select Build > Settings from the menu. Go to the Fragments tab.
- Add the Sequence.wxs file on your system to the list of fragment files.
- In the "Main WXS File Insertions" section, add a new Fragment Insertion item with the following settings:
Insertion type: Last Child
Target search string: //InstallExecuteSequence
Text to insert: <WriteRegistryValues Sequence="3600"/>
In the above "3600" is the new sequence number. You can change that to whatever you like.
- Now build and the MSI will have that standard action at the sequence you specified.