Skip to content

Maintenance Ruby 3.4 gets fixes, but no new features. 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 the value is the same as the 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 the same as for the read method.

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