*** 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: http://blogs.technet.com/b/heyscriptingguy/archive/2006/11/16/how-can-i-create-a-new-registry-key.aspx
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() oCache.TotalSize=10240
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.