Dim strKeyPath, strValueName, strComputer, objRegistry, strValue
Dim objFSO, objFolder, strFolderSize
Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
strKeyPath = "SOFTWARE\Microsoft\SMS\Client\Configuration\Client Properties"
strValueName = "Local SMS Path"
Set objRegistry = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")
objRegistry.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder(strValue & "Cache")
strFolderSize = UCase(objFolder.Path) & " uses " & objFolder.size & " bytes."
Wscript.echo strFolderSize
Set objRegistry = Nothing
Set objFSO = Nothing
Set objFolder = Nothing