To support installing my product from multiple CDs, I have determined that due to the fact that Windows can swap out parts of the installer while it's running and the disk is removed, I need to create a stub installer that copies the real installer to a TEMP folder on the user's machine, and then spawns that "real" installer (with Delete_on_Close).
My questions:
Is that the correct/best way to handle the problem?
Is there code already to do this, so I can save myself some time?
Or perhaps some built in support for this?
It would be nice, for example, if when a special flag was set, the installer actually had the stub on the front of the exe, and copied the real installer to the $TEMP folder, and spawned it with Delete_On_Close.
Thanks in advance.
Brian Weed
bw@imaginengine.com
Multiple CDs
3 posts
My own reply
Ok, so this is what I have so far...
Name "Silent"
OutFile "setup.exe"
SilentInstall silent
Var CWD
Var TMPNAME
Section
GetFullPathName $CWD $EXEDIR
SetOutPath $TEMP
GetTempFileName $TMPNAME
SetOverwrite on
File /oname=$TMPNAME "TheActualSetup.exe"
; Spawn that setup, telling it where the original data is
SetOutPath $CWD
Exec '"$TMPNAME" $CWD'
SectionEnd
One thing left to solve is getting the temp exe to delete itself.
Anyone?
Brian
Ok, so this is what I have so far...
Name "Silent"
OutFile "setup.exe"
SilentInstall silent
Var CWD
Var TMPNAME
Section
GetFullPathName $CWD $EXEDIR
SetOutPath $TEMP
GetTempFileName $TMPNAME
SetOverwrite on
File /oname=$TMPNAME "TheActualSetup.exe"
; Spawn that setup, telling it where the original data is
SetOutPath $CWD
Exec '"$TMPNAME" $CWD'
SectionEnd
One thing left to solve is getting the temp exe to delete itself.
Anyone?
Brian
You can do what the uninstaller does and delete it after reboot using Delete /REBOOTOK.