{"id":1873,"date":"2006-11-28T16:34:00","date_gmt":"2006-11-28T16:34:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/heaths\/2006\/11\/28\/save-time-and-space-for-vs-2005-sp1-by-disabling-the-patch-cache\/"},"modified":"2006-11-28T16:34:00","modified_gmt":"2006-11-28T16:34:00","slug":"save-time-and-space-for-vs-2005-sp1-by-disabling-the-patch-cache","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/setup\/save-time-and-space-for-vs-2005-sp1-by-disabling-the-patch-cache\/","title":{"rendered":"Save Time and Space for VS 2005 SP1 by Disabling the Patch Cache"},"content":{"rendered":"<p>The upcoming Visual Studio 2005 Service Pack 1 can <a href=\"http:\/\/blogs.msdn.com\/heaths\/archive\/2006\/10\/06\/VS-2005-SP1-Takes-a-While-to-Install.aspx\">take a while to install<\/a> and can <a href=\"http:\/\/blogs.msdn.com\/heaths\/archive\/2006\/10\/06\/VS-2005-SP1-Requires-a-lot-of-Disk-Space.aspx\">require a lot of disk<\/a> installed, and even more disk space while installing the patch. You can save a little of both by disabling the Windows Installer patch caching feature. <\/p>\n<p>Before doing so, understand that this patch cache contains copies of the files that were replaced by the service pack (a <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/minor_upgrades.asp\">minor upgrade<\/a>), so if you remove the cache or prevent it from being created in the first place, you will be required to have the original source media during uninstall of the service pack. Future patches may also require the original source media. If you have the disk space, it is highly recommended that you do not disable the patch cache. <\/p>\n<p>If you prevent the patch cache from being written in the first place, you can save some time to install the service pack patch because of a decrease in disk I\/O of about 1.3 GB when patching Visual Studio 2005 Team Suite. You can do this using the <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/maxpatchcachesize.asp\">MaxPatchCacheSize<\/a> system policy for Windows Installer. Because this property value may be read from an in-memory cache, it is recommended that you restart the Windows Installer service properly (never kill any <em>msiexec.exe<\/em> process as this can lead to system instability). <\/p>\n<p>Consider the following basic example of a batch script: <\/p>\n<p><span>reg export HKLMSoftwarePoliciesMicrosoftWindowsInstaller installer.reg<br \/>reg add HKLMSoftwarePoliciesMicrosoftWindowsInstaller \/v MaxPatchCacheSize \/t REG_DWORD \/d 0 \/f<br \/>net stop msiserver<br \/>start \/wait VS80-KB<em>nnnnnn<\/em>-X86-<em>mmm<\/em>.exe \/qn<br \/>reg delete HKLMSoftwarePoliciesMicrosoftWindowsInstaller \/v MaxPatchCacheSize \/f<br \/>reg import installer.reg<br \/>net stop msiserver<br \/>del \/q installer.reg 2&gt;nul <\/span><\/p>\n<p>The previous policy value &ndash; if any &ndash; is backed up first before setting it to 0 to disable the patch cache. The script uses <span>start \/wait<\/span> because the patch wrapper runs in the windows subsystem and will return immediately, <a href=\"http:\/\/blogs.msdn.com\/heaths\/archive\/2005\/11\/15\/493236.aspx\">just like <em>msiexec.exe<\/em><\/a>. You can pass additional switches after the executable such as <span>\/quiet<\/span>.<\/p>\n<p><strong>Updated<\/strong>: to reduce time even more, install the patch silently. I changed the install command in the script above to add \/qn to install silently.<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The upcoming Visual Studio 2005 Service Pack 1 can take a while to install and can require a lot of disk installed, and even more disk space while installing the patch. You can save a little of both by disabling the Windows Installer patch caching feature. Before doing so, understand that this patch cache contains [&hellip;]<\/p>\n","protected":false},"author":389,"featured_media":3843,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[20,45,50],"class_list":["post-1873","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-installation","tag-visual-studio","tag-vs2005sp1"],"acf":[],"blog_post_summary":"<p>The upcoming Visual Studio 2005 Service Pack 1 can take a while to install and can require a lot of disk installed, and even more disk space while installing the patch. You can save a little of both by disabling the Windows Installer patch caching feature. Before doing so, understand that this patch cache contains [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/posts\/1873","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/users\/389"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/comments?post=1873"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/posts\/1873\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/media\/3843"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/media?parent=1873"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/categories?post=1873"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/tags?post=1873"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}