PDA

View Full Version : Corrupted Files



jmcewan
11-04-2009, 09:49 AM
We are using SetupBuilder 6.9 and we have had numerous instances where the contents of one of our dlls gets replaced with another dll that we install. Everything seems to be working fine after installation but it seems like after a reboot, a file is sometimes overwritten. We have no idea what causes this though. It is often the same dll but not always. When it is the same dll it is always replaced by the same dll in a completely different directory. Has anyone else seen anything like this before with their installations?

Thanks
Jonathon

linder
11-04-2009, 09:58 AM
Jonathon,

I have never ever heard of anything like this. I don't think that it is related to the installation. You can check the installation .log to see what the installer copied to the machine (including file time stamp and CRC32). And before the reboot, you can check the registry to see which files gets replaced after the reboot. Perhaps this can give more information what is going on.

Friedrich

jmcewan
11-04-2009, 03:02 PM
Friedrich,

Thanks for the reply. I have checked the log file and nothing stands out as wrong. Also, this is not a problem that happens all the time. It only seems to happen sometimes so it is very difficult to check the registry keys. We have multiple programs that write the same files to the CommonFiles directory under Program Files. Currently, we are stopping any of our programs that are running, and then trying to install these common files, so that there shouldnt be any issues with not being able to overwrite these files. Its these common files that seem to overwrite our dlls in another directory, so our best guess was that the common files dll was in use and couldnt be overwritten so it was scheduled to overwrite at next startup of the computer. Then somehow it was overwriting the wrong file. Is setting the option to register these common files as Shared Files a better method to deal with this? If so, is there a way to not have that message about "are you sure you want to remove these common files" appear during uninstallation? I think if no other installed programs are using the files, it should just remove the shared files without asking the user.

linder
11-05-2009, 03:29 AM
Jonathon,

The "Shared Files" option just tells the install/uninstall to increase/decrease the shared file counter in the Windows registry. If the shared file counter is "0" then the uninstall will remove that file. Otherwise, the file is not removed.

The "replace on reboot" scenario works as follows. If the installer detects a "locked" (in-use) file, it can't replace it and writes the file to a temporary location and logged in the registry so Windows can replace it on the next reboot.

Friedrich