How to change the Configuration Manager 2012 Cache Size using the Application method

*** UPDATE *** How to do this same thing using Powershell – See my post here!

Coming from Novell ZenWorks to Configuration Manager 2012 has been a bit of a learning experience.  A while ago I made a post on how to change the config manager cache size (as by default it’s set to 5GB) via the SCCM 2007 package method.

I’ve since learned how to do it via the new ‘Application’ method and I thought I would post how I did it here.


You will need a vbs script that will change the cache value to 10GB (or whatever size you want – this example changes it to 10GB) as well as set a registry key that is used to determine whether the application has installed or not.  I did not write the script but used a variety of sources to piece it together so feel free to optimize it in anyway you see fit.  I forget where I got the cache size part from but for the reg key part I used the following website:

The script is very straight forward to understand and make any modifications to meet your needs.  Open notepad and copy \ paste the following:

Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "." 
Set objRegistry = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv") 
strKeyPath = "SOFTWARE\My Reg Keys\CCM\CacheSize"
objRegistry.CreateKey HKEY_LOCAL_MACHINE, strKeyPath
strValueName = "SizeInMB"
stValue = "10240"
objRegistry.SetStringValue HKEY_LOCAL_MACHINE, strKeyPath, strValueName, stValue
set oUIResManager = createobject("UIResource.UIResourceMgr")
set oCache=oUIResManager.GetCacheInfo()

Save the file and rename it SetCache.vbs (or whatever name you see fit)


Save the SetCache.vbs file somewhere on your ConfigManager server where you would normally place your application source files.


Create a new application in Configuration Manager using the Create Application Wizard as you would normally but ensure that you select ‘Manually specify the application information’ then click next.




Fill in the details on the ‘Specify information about this application’ dialog then click next.




Again, fill in any details you require on the ‘ Specify the Configuration Manager Application Catalog entry’ dialog then click next.




Click ‘Add’ on the ‘Configure deployment types and the priority in which they will be applied for this application’ dialog.



Change the ‘Type’ to ‘Script Installer (Native)’ on the ‘Specify settings for this deployment type’ dialog, then click next.




Fill in the details you require on the ‘Enter a name and discription for this deployment type’ dialog then click next.




Browse to the location of your .vbs file we created earlier (See step 2 of this guide) and in the ‘Installation program’ field enter, cscript “SetCache.vbs” (Where SetCache.vbs is the name of your .vbs file created earlier) then click next.




On the ‘Specify how this deployment type is detected’ dialog, click the ‘Add Clause…’ button.




This next screen is where we add the rules that Config Manager will use to detect whether the program has been installed or not.  Our vbs script included writing a custom reg key and value which we will use for this.  Assuming you have not changed the script in step 1 of this guide, fill in the fields so that they match the screenshot below then click OK:




On the resulting dialog screen click the next button.




Set the installation behaviour to install for system and the logon requirement to ‘ Whether or not a user is logged in’ then set any other values to suit your needs.




Add any system requirement for this application that you would like (if any) then click next.




Specify any software dependencies if you need to then click next:




Check the summary screen before confirming then click next.



The resulting application:




Now deploy the application to your computer collections or as this is now an ‘Application’ you can make it available to the Software Catalog for users to run themselves should you wish to.  I chose to make this a required deployment to a computer collection when I used it.

That’s it!

*** UPDATE *** How to do this same thing using Powershell – See my post here!


  1. Thank you this worked perfectly for me. We immediately ran into cache size issues when deploying Adobe CC 2014 for Enterprise/Education

  2. Thanks! Works great. I modified it to just use the last 3 lines of the script. The rest was just for checking the install status (step 11 above). To check status, I will probably run a report showing client cache size and see what was missed.

    Thanks again.

  3. this is great I used your detection method but instead of saving a file I just ran a powershell command so that way I don’t have to distribute 10kb file everywhere .
    powershell.exe -Command “(New-Object -COM UIResource.UIResourceMgr).GetCacheInfo().TotalSize = 20

    • could you please elaborate on the detection method part? so checking for the registry string? …dont the registry settings change the value anyway? (ie. how are you configuring the files in the registry?)

  4. Hi,

    I seem to get an error:
    Error: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

    the path is definitely less than 248 characters….
    any suggestions?

    • Is the path length close to the max value? Don’t forget this is the fully qualified path length. Try a reaaaaalllllllllly short path to test and see what happens.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.