Showing results for 
Show  only  | Search instead for 
Did you mean: 

[Installscript] Exe getting deleted on upgrade



I have a installscript type of project. A component has around 10 assemblies and a exe dynamically linked. I copy the changed files to the dynamically linked folder and increase the version (lets the 3rd digit). THats the way i give build.

Everyting was fine. But from the last upgrade there is a peculiar problem. The Exe file is getting deleted when you do a system restart. Basically its a windows service exe.On doing the repair it works fine. ANd if i do a repair and restart the PC to check , the file is not getting deleted in this case.

What might be the reason?? how do i fix this ?

Labels (1)
0 Kudos
1 Reply

Re: [Installscript] Exe getting deleted on upgrade

It sounds like at some point the exe is being registered for removal at reboot, perhaps during the uninstallation of the previous version. I'm guessing that it is then unlocked, and is able to be replaced by the new version's file. However the removal isn't unscheduled. You might be able to verify or even address this by adding and changing the miscellaneous event handler OnFileLocked; by default it requests that the file be handled after reboot. Note that if my understanding of the scenario is correct, however, that the fix would have to be in the base version, so if you've released this you might need to look into alternatives (such as parsing the PendingFileRenameOperations key in the registry to remove the obsoleted request).
0 Kudos