I use this to count my registry sizeFUNCTION getRegSize(report AS BOOLEAN) AS INTEGER ' trig by saveAll(1) report False, and for testing from console where report may be True
sz = 30 ' Header for the whole registry
r = CreateObject("roRegistry")
secList = r.GetSectionList()
FOR EACH name IN secList
secSz = 8 ' A small header for each registry section (2 bytes plus section name, assume 6 more bytes)
sec = CreateObject("roRegistrySection", name)
keyList = sec.GetKeyList()
FOR EACH key IN keyList
val = sec.Read(key)
secSz = secSz + Len(val) + 4 ' Headers - add 2 bytes for the key and 2 bytes for the value
END FOR
IF report THEN ? "getRegSize() sec name " name ", secSz" secSz
sz = sz + secSz ' Add this section's secSz to the overall sz
END FOR
IF report THEN ? "getRegSize() overall sz" sz
RETURN sz
END FUNCTION