Skip to content

End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

instance method

Win32::Registry#[]

[](name, *rtype)

Read a registry value named name and return its value data. The class of value is same as read method returns.

If the value type is REG_EXPAND_SZ, returns value data whose environment variables are replaced. If the value type is neither REG_SZ, REG_MULTI_SZ, REG_DWORD, REG_DWORD_BIG_ENDIAN, nor REG_QWORD, TypeError is raised.

The meaning of rtype is same as read method.

See also #[]= .wtime2time .type2name #close also in 3.4 · 3.3 · 3.2 · 3.1