4 ms·
This is a weird article because you can't talk about the structure of the Windows Registry without talking about INI files [1]. Example: [owner] name =
by cletus 4y ago
This is a weird article because you can't talk about the structure of the Windows Registry without talking about INI files [1]. Example:
[owner]
name = John Doe
organization = Acme Widgets Inc.
Some comments on the post mention INI files. It's mentioned by commenters in the previous HN submission too.
But the Registry was built like it was to easily translate INI files into a semi-filesystem structure.
[1]: https://en.wikipedia.org/wiki/INI_file https://en.wikipedia.org/wiki/INI_file
- Jaruzel 4y agoIn fact, if I recall correctly, in Windows 95 badly behaved 16 bit Windows apps that tried to put their own INI files in C:\Windows had those file writes/reads silently redirected to a part of the then new Registry.
- int_19h 4y agoIn 16-bit Windows, there were several global shared INI files, most notably \WINDOWS\WIN.INI, that effectively operated much like registry. You can still see this reflected in the Win32 API pertaining to INI files - there's Get/SetProfileString which does not take a filename as an argument, and then there's Get/SetPrivateProfileString which does. Some Win16 apps would add their entries to that file - but this wasn't "badly behaved" at the time, as evidenced by the fact that e.g. SetProfileString specificaly has an argument for "app name", so the ability to do so was intentional and documented. If I remember correctly, it was in Windows NT - where \WINDOWS became read-only for non-admins - that they started doing redirections; and even then they are done specifically for those global shared .INI files. The mappings are configurable, with configuration itself defined by registry keys - look at HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\IniFileMapping to see what gets mapped where.
- wqweto 4y agoThe hierarchical nature of the registry elevates old INI files to at least TOML format in this regard :-))