VBScript to Set SMS Client Cache Size

Simple VBScript for setting the client cache size.

----Begin VBScript----
On Error Resume Next

' Declare Variables
Dim checkCacheValue
Dim setCacheValue

' Set the Cache Size to check for (less than or equal to)
checkCacheValue = 1024

' If less than or equal to the checkCacheValue
' set the Cache Size to this
setCacheValue= 1024

Dim oUIResourceMgr
Dim oCache

Set oUIResourceMgr = CreateObject("UIResource.UIResourceMgr")
Set oCacheInfo = oUIResourceMgr.GetCacheInfo

' Set it if it's less than or equal to checkCacheValue
if oCacheInfo.TotalSize <= checkCacheValue then
oCacheInfo.TotalSize = setCacheValue
end if

'Return the error so SMS can report it
WScript.Quit(Err)
----End VBScript----

Comments

Popular posts from this blog

SMS "Program failed (run time exceeded)" 10070

SMS "Waiting for User Condition" 10036

SMS "Waiting for content" 10035