Why do msi installations use slower drives over faster ones in windows 7?

7

I have noticed that the slowest drive in my system is used most during an msi installation. I mainly notice this when running windows updates but it seems to be msi installs in general.

The setup I last saw this occur on was running Windows 7 with the following drives:
Sata:
240GB SSD NTFS ~515MB/s Operating system drive
1TB NTFS ~110MB/s
Firewire:
4TB ExFAT ~80MB/s

I would think that windows would choose the fastest drive with available space for temporary files. But it will instead choose the external drive with the slowest transfer speed. I could also understand choosing the 1TB for not being an ssd in an attempt to preserve the longevity of the ssd write capacity. Why does this happen? Is there a way to force these installations to use the OS drive or a specific drive?

Joshua C

Posted 2012-06-25T00:13:29.110

Reputation: 73

2Windows uses your system drive unless you change the locations of your temporary files. – Tamara Wijsman – 2012-06-25T00:31:58.727

4I think windows choose the drive with more free space independently of anything else. Can you confirm the 1TB drive is the one with more free space available? – fmanco – 2012-06-25T01:56:15.690

@TomWijsman: The temporary file locations have not been changed. In this case it was running windows updates on a fresh install. – Joshua C – 2012-06-25T13:16:10.793

@criziot: That is correct, the external has the largest amount of space. – Joshua C – 2012-06-25T13:16:23.617

Answers

11

When a MSI executes it sees if the variable ROOTDRIVE is defined internally in the MSI. If it is not defined in the msi for a normal install it will set it to the local drive with the largest free space (and normally larger drives are slower).

If you are performing a Administrative install (Administrative is usually only used for installing using Group policy) it adds another step to the previously described process. It will use the first available network drive that is writable instead of the largest local drive first, then if there are none, it will then attempt to use the largest local drive.

You can set the ROOTDRIVE parameter by running your msi using the following command

msiexec /i package.msi ROOTDRIVE="C:\"

However if inside the msi the author of the msi set the path of ROOTDRIVE in the install script that change will override the setting you set on the command line.

Scott Chamberlain

Posted 2012-06-25T00:13:29.110

Reputation: 28 923

If ROOTDRIVE is not defined it uses the first network drive it can find that is writable. Source? It's very odd to use the network for installations... – Tamara Wijsman – 2012-06-25T13:20:56.490

1@TomWijsman - The link he provided is proof enough. I will quote it for you " During an administrative installation the installer sets ROOTDRIVE to the first connected network drive it finds that can be written to. If it is not an administrative installation, or if the installer can find no network drives, the installer sets ROOTDRIVE to the local drive that can be written to having the most free space." I expect more from somebody with your reputation. – Ramhound – 2012-06-25T14:02:46.453

@TomWijsman The reason for this is for Administrative installs you are usually installing over the network in mass anyway and you would not know for sure that there is room to extract the temp files on the destination computer. I believe that is the logic of that policy. I doubt that Joshaua is doing a administrative install, I have reworded my answer to make it more clear. – Scott Chamberlain – 2012-06-25T14:17:37.487

@Ramhound: I didn't expect anything else from someone with your name / age. I'm just looking for an explanation / reasoning for such choice, there's nothing wrong here. Stop picking on the younger people, thank you... – Tamara Wijsman – 2012-06-25T14:28:48.713

@ScottChamberlain: Thank you, makes sense from a ServerFault point of view... :) – Tamara Wijsman – 2012-06-25T14:30:24.080