Is it safe (or advisable) to compress Windows Installer folder via NTFS compression?

23

5

The title pretty much explains the question.

Aside from the obvious (speed), is it generally safe or advisable to compress via NTFS compression the C:\Windows\Installer folder given that it's within the Windows folder?

I'm using an SSD so personally the speed issue isn't that important to me (plus I'm running Win7 within a VM so I'm accustomed to higher I/O latency).

Chad Levy

Posted 2012-07-26T20:34:52.423

Reputation: 1 010

1I did it and run into a bunch of problems, messing with hidden system folders is not advisable unless explicitly approved by Microsoft. – Vojtěch Dohnal – 2016-06-26T09:01:27.687

note that Windows 10 has added a compress OS (compact) feature that allows you to save quite some space (especially useful if you can't find enough space to do a feature upgrade on a size constrained device): http://www.intowindows.com/how-to-compress-windows-10-installation-files-folders/

– George Birbilis – 2018-06-12T09:03:36.907

1@GeorgeBirbilis great find. I'll give that method a try on my VMs. On a side note, "method 2" in your link talks about compressing the entire drive using NTFS compression. That begs the question: if the entire drive can be compressed without Windows balking, then why does it matter if a single directory is compressed? – Chad Levy – 2018-06-12T21:08:26.737

Actually I haven't seen issue myself in the past with compressing the whole drive, especially if it's fast enough and you have a decent CPU. Usually I'd do it in a size constrained device if I needed more space (say to be able to do Windows 10 Feature Updates) in the system partition. On my Intel TV Stick I use the compact OS feature. BTW, that "compact" command seems to be usable on any folder with executables, even has a parameter to pick the compression method when they don't specify the parameter to compact the OS (not sure why you can't combine the two params) – George Birbilis – 2018-06-15T12:36:26.773

I wonder if compressing a filesystem might actually make it faster, rather than slower, particularly for infrequently-changed files. Nowadays it's common to encrypt /decrypt on the fly with BitLocker, so we're happy dedicating a certain amount of CPU to every read/write. – mwfearnley – 2020-01-07T10:12:03.470

1Are you referring to NTFS file compression or archiving these files (like a .zip)? – Der Hochstapler – 2012-07-26T20:57:07.837

4NTFS file compression. I'll update the question to reflect this. – Chad Levy – 2012-07-26T20:57:32.590

Answers

20

Except for speed issues (there is a lot of discussion here on that topic with some saying it is actually beneficial to performance in some ways) there is no issues in using NTFS compression a current Windows installation disk and all it's folders in it.

  • Your files are there, available, they do not really change to a secret compressed file or something, this is done at the file system level
  • Performance is not worst depending on opinions and some tests
  • They are recoverable using the Windows repair utilities or by connecting your disk to another computer (besides, nothing important is ever kept inside c:\Windows, your important files should be else where...)

Microsoft has put together some guide-lines about NTFS compression, have a look at them.

I have used NTFS compression for ages now on complete file systems on several clients and Windows versions and never had an issue because of the compressed filesystem.

Bruno Pereira

Posted 2012-07-26T20:34:52.423

Reputation: 6 450

7

Yes, there is nothing special about the Installer directory that requires them to be uncompressed.

In the old days, there were piles of installer files like unwise.exe, unvise32.exe, uninstall.exe, etc. in the \Windows\ directory; sometimes shared, sometimes not. The \Windows\Installer folder is the Windows Installer cache, which allows each program to maintain its own installation program, similar to how the WinSxS folder helps to avoid DLL Hell.

In general, it is used to store/cache the basic installer for programs, so that when you want to modify an installed program, it runs from there and allows you to uninstall or possibly even do a repair without needing the original installation media, and so there should be no adverse affects from setting it to use NTFS compression.


I’ll leave the answer to whether you can compress/archive them as ZIP, RAR, etc. for others who find their way here, looking for that.

Some programs choose to store their entire installer which of course is undesirable, but fortunately those are rare; most just store a smaller installer file (like unwise32.exe in the old days) with the basic installation information. Most programs don’t use the files in the Installer folder at all and they only come into play when you make a change with Add/Remove Programs.

Occasionally however, you may find a program that actively uses some of the files, particularly by setting the icon of their shortcuts (in the Start menu, desktop, etc.) to point to the ARPPRODUCTICON.exe file in its Installer cache.

In most cases, you can compress or move the files and put them back when you want to make a change (modify, repair, uninstall). In fact, the folder is ultimately a cache of installation files, so you could even delete them and just use the original installation media.

NB: it is not only programs that cache their installation files in the Installer folder; Windows itself keeps patches and service-pack data in there as well, so if you delete them, updates may not work, and theoretically, you might have to re-install Windows. Don’t just move/delete the entire contents willy-nilly; take a look at what is in there.

Synetech

Posted 2012-07-26T20:34:52.423

Reputation: 63 242

Referring to your last sentence, are not the compressed files (using NTFS file compression) still accessible while compressed? – Chad Levy – 2012-07-26T21:05:06.250

1Oh, you mean compressed as in the compressed bit of NTFS? Yes, definitely. There’s nothing wrong with that at all. I thought you meant compressign them as in archiving it as a ZIP, RAR, etc. – Synetech – 2012-07-26T21:06:35.453

Yeah, sorry about that. I updated the question after your answer. – Chad Levy – 2012-07-26T21:09:43.000

1

SQL Server (and other databases too) may not be running normally if you install them on a compressed partition. They may simply fail to install.

Here is a post describing the scenario. I also encountered this on SQL Server 2014 Express.

Ryan

Posted 2012-07-26T20:34:52.423

Reputation: 131

1Could you add a source for that information? – Burgi – 2016-05-11T09:28:27.640

The scenario is described here by another user: link. I also encountered this on SQL Server 2014 Express.

– Ryan – 2016-05-13T13:54:04.783

it was a hint for you to edit your answer to help you improve the quality of it ;) (also include a quote or two from your source)

– Burgi – 2016-05-13T14:59:36.117

Thanks! I'm quite new to Super User and I will commit to improving quality of my answer. – Ryan – 2016-05-14T04:03:36.543

-3

I'd advise against it, like Startup recovery might depend on those files, then you'd be unable to uncompress those files without another computer

Keithsoulasa

Posted 2012-07-26T20:34:52.423

Reputation: 166

1Do you have any sources for this? I am unable to find any references to starup recovery/repair relying on content in the Installer folder. Given that I alternate my Win7 install between bare-metal boots and VM boots (via Mac with BootCamp and VMWare Fusion), this certainly caught my attention since I'm more likely to encounter startup issues. – Chad Levy – 2012-07-26T21:14:59.627

3NTFS compression is done at the volume level. Startup recovery will do fine with or without it. . . – surfasb – 2012-07-27T01:38:52.760

Etherway, the installer folder is a pretty important place . If Startup recovery has to reinstall anything, without the installer folder your stuck .

Find another way to save space.. – Keithsoulasa – 2012-07-27T05:27:07.003