PDA

View Full Version : Replacing files issue



Sam
02-07-2012, 10:12 AM
Hi!

I seem to be experiencing a very rare issue where sometimes an existing file does not get replaced when using the "Install File" function, even though the replacement option is always set to "Always". I'm thinking that this is caused by files being in-use at the time, but I dont have enough data to confirm this.

My question is, would it be a good idea to check the %_SB_ERRORCODE% variable after each call to "Install File" to make sure the file got installed correctly? Or is this redundant due to internal error checking in setupbuilder?

Thanks,
Sam

linder
02-07-2012, 10:24 AM
Sam,

If the installer has to replace an in-use (locked) file, then Windows needs a reboot at the end of the installation process. Make sure that 1) you have admin privileges and 2) that you do not suppress the reboot message.

It is not necessary to check the %_SB_ERRORCODE% error code because install file failures are fatal errors and the installer would terminate immediately. A locked file is not an error because the standard behavior is to reboot the machine in this case to replace the file(s).

Does this help?

Friedrich