title: Wix: Schedule a custom action to run after next reboot
body: <p>Is it possible to schedule a custom action after a reboot?  Here's my predicament.</p>
  
  <p>I have a product to uninstall and reinstall but some of the files are in use by another application at the time of reinstall.  This causes problems for the uninstall because the files are in use so I use a custom action which runs a batch file to rename the files in use.  This is a bit of a hack but makes the uninstall and reinstall not complain about the files being in use and replaces the files I want.  </p>
  
  <p>The reason for doing this is that I'm not allowed to force a reboot on the machine during the installation process but I need to make sure that the files get replaced.  So far so good.</p>
  
  <p>This has the side effect of a bunch of files hanging around that I've renamed with a prefix toDelete_fileX.dll along with the new fileX.dll in the folder.  </p>
  
  <p>I have another custom action to delete these files which works fine but I can't run it at the end of the installation because the other application still has a handle to these renamed "toDelete_" prefixed files.  </p>
  
  <p>At some point in the future the system will be rebooted and this is where I would like the custom action to run to delete the "toDelete_" prefixed files.</p>
  
  <p>Thanks. Neil</p>