An alternative approach is to use an A/B update mechanism, where you always keep the previous version of the software installed, and after an update completes, swap shortcuts, etc. to point to the new version.
(If folder A is the last working version, install to folder B, then point shortcuts to the exe in folder B. Likewise for folder B being the last working version, wipe and overwrite folder A, then install there, and swap the shortcuts.)
This might not be practical for large software, but it ensures you always have one functional version installed, and avoids issues like this one.