I have noticed recently that I have had some several customers all with the same issue, and that is some administrator received an alert that the system drive was low on drive space and they went to fix it.
Before I started working for Microsoft there were very few choices, Hard Drives were expensive so system drives were as small as possible, and virtualization didn't exist. You had to find files to delete, you found ways to keep things off the System Drive.
These days I see things much different Hard Drives are much cheaper now and before certain global issues they were even cheaper, and with virtualization you can grow a drive anytime you want. So I do not understand why we are still deleting files from the system drive instead of having a really big drive or just extending it.
But let me get off my soap box and get to the point, my customer was trying to update SharePoint to the latest service pack, they would double click the executable and after it opened but before hitting any other prompt they would get the error
"The detection failed this can be due to a corrupted installation database."
This error is because you have deleted files from the local install cache which is thee folder C:\Windows\Installer and while most Microsoft products don't have an issue with this all Office products (Yes that includes Excel and Outlook) won't allow you to patch if the expected earlier patches are missing from this cache.
As long as the admin has not deleted the C:\Windows\Installer folder itself then I know of two ways to deal with this:
The moral of this story is DON'T DELETE FILES OFF THE SYSTEM DRIVE UNLESS YOU PUT THEM THERE!!