Welcome to MSDN Blogs Sign in | Join | Help

Save Time and Space for VS 2005 SP1 by Disabling the Patch Cache

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 copies of the files that were replaced by the service pack (a minor upgrade), 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.

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 MaxPatchCacheSize 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 msiexec.exe process as this can lead to system instability).

Consider the following basic example of a batch script:

reg export HKLM\Software\Policies\Microsoft\Windows\Installer installer.reg
reg add HKLM\Software\Policies\Microsoft\Windows\Installer /v MaxPatchCacheSize /t REG_DWORD /d 0 /f
net stop msiserver
start /wait VS80-KBnnnnnn-X86-mmm.exe /qn
reg delete HKLM\Software\Policies\Microsoft\Windows\Installer /v MaxPatchCacheSize /f
reg import installer.reg
net stop msiserver
del /q installer.reg 2>nul

The previous policy value – if any – is backed up first before setting it to 0 to disable the patch cache. The script uses start /wait because the patch wrapper runs in the windows subsystem and will return immediately, just like msiexec.exe. You can pass additional switches after the executable such as /quiet.

Updated: to reduce time even more, install the patch silently. I changed the install command in the script above to add /qn to install silently.

Published Tuesday, November 28, 2006 1:34 PM by Heath Stewart

Comments

Tuesday, November 28, 2006 8:00 PM by Norman Diamond

# re: Save Time and Space for VS 2005 SP1 by Disabling the Patch Cache

(1) I think the second "net stop msiserver" should be a start instead of a stop?

(2)

> never kill any msiexec.exe process as this

> can lead to system instability

Sometimes I've killed msiexec.exe processes when they appeared to be hung and I hadn't read your advice yet.  In the future should I do a reboot instead, or should there be some other way to retry an install operation?

(Though if I recall correctly I've ended up needing reboots after killing msiexec.exe processes anyway.)

Tuesday, November 28, 2006 8:39 PM by Heath Stewart

# re: Save Time and Space for VS 2005 SP1 by Disabling the Patch Cache

1. It should be a stop. When msiexec.exe invokes a client install it will start the service automatically if not already started. So, the script stops the Windows Installer service so that the next client doesn't get the changed value.

2. Msiexec.exe hangs around for 10 minutes and if there's no further activity it will stop the service (the msiexec.exe process that seems to "hang around" running as SYSTEM). If you're doing an install and nothing seems to be happening, you might use something like Process Explorer from SysInternals to see if new threads, handles, etc., are being created and destroyed.

One thing that can - and had, to some people who reported doing it - happen when you kill msiexec.exe is that any clean-up wouldn't happen (if you killed the server process).

Wednesday, November 29, 2006 5:01 PM by Ken Fleming

# re: Save Time and Space for VS 2005 SP1 by Disabling the Patch Cache

Do we have any idea when SP1 is released.

Even with the problems I have had with the beta is still an improvement.

Thursday, December 14, 2006 4:28 PM by CedarLogic - Shawn Cicoria

# Heath Stewart's Blog : Save Time and Space for VS 2005 SP1 by Disabling the Patch Cache

Good pointer for those that can't wait :) Sorely needed SP1 is out soon... Link to Heath Stewart's...

Thursday, December 14, 2006 6:20 PM by おぎわら@.NET道場 Blog(わんくま編)

# VS 2005 SP1関連Blogめも

VS 2005 SP1関連Blogめも

Friday, December 15, 2006 11:34 AM by Lorenzo Barbieri @ UGIblogs!

# Alcuni Tip sull'installazione del Service Pack 1 di VS2005

Friday, December 15, 2006 6:15 PM by Teoman Soygul

# Split streaming this huge patch

Does anybody know how to split stream / integrate this package into the original installation just like we always do with windows xp or office 2003?

Saturday, December 16, 2006 10:45 AM by Heath Stewart

# re: Save Time and Space for VS 2005 SP1 by Disabling the Patch Cache

Sunday, December 17, 2006 6:12 PM by Bob Sagat

# Thanks!

WOW! Installing it without this, i still wasn't 100% complete after 3+ Hours, using this tip it cut it down to 30 minutes, thanks!

Tuesday, December 19, 2006 3:06 AM by Jon Galloway

# Things I wish I'd known before I installed VS 2005 Service Pack 1

1. Save Time and Space for VS 2005 SP1 by Disabling the Patch Cache (via Heath Stewart ) The SP1 requires

Wednesday, December 20, 2006 4:33 AM by Loser-X

# Visual Studio 2005 SP1

Good: Much more responsive IDE is the biggest plus. Also, according to Scott Guthrie , it contains over

Thursday, December 21, 2006 7:22 AM by Ahmed Salijee

# Two VS05 SP1 Installation Tips

1) Read the release notes 2) Check out Save Time and Space for VS 2005 SP1 by Disabling the Patch Cach

Thursday, December 21, 2006 10:28 PM by StevenHarman.net

# Installing VS 2005 Service Pack 1 - It went well!

Installing VS 2005 Service Pack 1 - It went well!

Friday, December 29, 2006 5:23 AM by Heath Stewart's Blog

# The Visual Studio 2005 Service Pack 1 Installation Experience

Visual Studio 2005 Service Pack 1 can take a long time to install and may apply to multiple products

Wednesday, January 03, 2007 11:19 AM by Aaron Stebner's WebLog

# Links to detailed information about Visual Studio 2005 SP1 setup

Heath Stewart has written several very useful blog posts about Visual Studio 2005 SP1 that I wanted to

Monday, January 08, 2007 6:34 PM by My VSTS Blog

# Tricks and Tips for installing VS2005 and more

In my consulting roll with VSTS/TFS, one of the things I often work with clients on is how to setup and

Thursday, January 11, 2007 4:14 PM by Heath Stewart's Blog

# Known Issues with Visual Studio 2005 Service Pack 1

There are several known issues when installing Visual Studio 2005 Service Pack 1 . I've documented these

Thursday, January 11, 2007 4:20 PM by Heath Stewart's Blog

# Known Issues with Visual Studio 2005 Service Pack 1

There are several known issues when installing Visual Studio 2005 Service Pack 1 . I've documented these

Sunday, January 14, 2007 11:27 AM by Adel Khalil

# Surprise: Smooth installation of Visual Studio Service Pack 1 on Vista

All of you of course heared all the fuss about how hard, tricky and painfull the installation of Visual

Monday, March 12, 2007 2:47 PM by Life, Universe and Everything according to Dirk

# How To Install Visual Studio 2005 SP1

I had two big issues while installing Visual Studio 2005 SP1: installation takes ages, and on Windows

Sunday, March 18, 2007 4:32 AM by Rise

# 安装 VS2005 SP1 有关问题的解决办法

VS2005SP1出来了,号称是M$有史以来最bt的补丁,看见有人装了3个多小时还在收集信息

Tuesday, December 11, 2007 11:44 AM by Kyle Finley

# Save space installing Visual Studio 2005 with SP1 (including the TFS Client)

As most of you know Service Pack 1 for Visual Studio 2005 is a bit of a beast. I personally think...

Tuesday, November 25, 2008 10:46 PM by Microsoft Japan Forum Operators Blog

# 【日本語版】 Visual Studio 2005 SP1 の既知の問題

こんにちは! フォーラム オペレーターの服部 清次です。 ここ最近、 MSDN フォーラムの「よくある質問」へのアクセスがだんだん増えてきています。 (^_^)v この勢いを失わないように、これからも皆さんにとって有益な情報をドシドシ載せていきたいと思います!

New Comments to this post are disabled
 
Page view tracker