Can MSI be run from Temp directory?

I am prepared in the book "The Ultimate Guide to Windows Installer" (Phil Wilson - Chapter 14 - "Bootstrappers and Temp Folders") that the bootloader should not run the MSI from the temp directory because "the Temp folder might be too easy to delete .. and then the file may disappear when you repair or modify the product.

It's true? I thought that when MSIEXEC starts installing the MSI, it makes a copy somewhere in C: .. So the modification / patch will not use the original MSI in the Temp directory. Do you agree or disagree with me (or with Phil).

+2


source to share


1 answer


Well, yes, it makes a copy ... but any embedded CAB files in the MSI are removed before the MSI is cached. Otherwise, every installation you make will require doubling your disk space - once for installed files, once for cached files.

Multiple boot copies will make a copy of the original MSI in "%Windir%\Downloaded Installations"

(or similar) and run the installer there, ensuring that all embedded CAB files are still available in case you need to repair later or the embedded files are required by separate CAs during uninstallation.

Therefore, while you can get away with running the MSI from the temp folder, you can still run into problems. I experienced this myself when downloading the MSI to the desktop and uninstalling it after the installation is complete.

The best way to find this is in the context of network deployment, let's say you have a really large compressed MSI file with embedded CAB files deployed over your network - it doesn't make sense to cache both the MSI and all source files (doubling the disk space required for installation) when Windows Installer can strip CAB files, leaving much less local data on the local computer.



Depending on how your installation was created, you can uninstall it without the original source, but you cannot. Rather than assume the worst case, Windows Installer only caches what is needed and assumes it can access the original source (CD, network share, downloaded file, etc.) if the original ones are required to restore or uninstall CAB.

Basically, put the MSI somewhere, install it, uninstall and try uninstalling. If you succeed, you will have no problem. If you're asked for a source file, you're running into the problems Phil describes :)

Edit: As Michael points out in the comments below, it is also worth trying to recover with MSI removed / missing.

+5


source







All Articles