2

I'm using IExpress to combine my bootstrapper and msi file. It works fine except that if I install the program on a machine without any of the prerequisites (.net 4, sql ce), it will fail. It always fails after rebooting, which happens after installing the .net 4 framework. In the error log that it points me to, it gives a message along the lines of

Error: Unable to locate application file

Restarting the installation after it fails installs it correctly, but this isn't an acceptable solution for this project. Anyone have any ideas about how to fix this? Let me know if I need to explain anything else. Thanks.

wangburger
  • 1,073
  • 1
  • 18
  • 28
  • 1
    When you get the reboot, do you get anything written to the RunOnce key? This is typically the mechanism used to start any programs that need to run after a reboot. It's possible that the file you want to run is stashed in a temp folder which may be being cleared out during the reboot. So... before the reboot occurs, check what the RunOnce key is pointing to, and then after the reboot check whether this path is still valid. – Stephen Connolly May 25 '11 at 21:49

1 Answers1

1

Stephen's right; as soon as the IExpress SFX terminates, it deletes the temporary directory it uses for extraction (something along the lines of %temp%\IXP000.TMP). So after the reboot, your MSI is gone.

To persist your installer files, you'd want to copy everything to a different directory first. You could launch a batch file (eg set the install program command to something like cmd /c persist.bat). Then persist.bat would look something like:

@echo off
xcopy /y * "%temp%\myproject\"
msiexec /q /i "%temp%\myproject\install.msi" /l*v "%temp%\myproject_install.log"
fission
  • 1,170
  • 18
  • 35