Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
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
Option Explicit
Dim objSMSClient : Set objSMSClient = CreateObject("UIResource.UIResourceMgr")
Dim objSMSCache : Set objSMSCache = objSMSClient.GetCacheInfo()
WScript.Echo objSMSCache.Location
WScript.Echo objSMSCache.TotalSize
WScript.Echo objSMSCache.FreeSize
WScript.Echo objSMSCache.MaxCacheDuration
WScript.Echo objSMSCache.ReservedSize
Option Explicit
Dim objWMIService : Set objWMIService = GetObject("winmgmts:\\.\root\ccm\softmgmtagent")
Dim colCacheInfo : Set colCacheInfo = objWMIService.ExecQuery("SELECT * FROM CacheConfig")
Dim objCacheInfo, objProperty
For Each objCacheInfo In colCacheInfo
WScript.Echo objCacheInfo.InUse
WScript.Echo objCacheInfo.Location
WScript.Echo objCacheInfo.Size
Next