I know the Windows OS is (generally) case insensitive. Is this true for all the Windows OSes (from Windows 95 up to Windows 7)? Is there any registry setup to make Windows case sensitive?
Yes, this is true for all versions of Windows. There is no way to make Windows case sensitive. Keep in mind though that some apps which were originally developed for Unix/Linux and then ported may be case-sensitive. Cygwin, for example, is case sensitive. This behavior is extremely rare though.
Microsoft added a new case sensitive flag (attribute) that can be applied to NTFS directories (folders). For directories that have this flag set (enabled), all operations on files in that directory are case sensitive, regardless of whether FILE_FLAG_POSIX_SEMANTICS was specified. This means that if you have two files that differ only by case in a directory marked as case sensitive, all applications will be able to access them.
Starting with Windows 10 build 17107, Microsoft has added the ability to view and modify this flag to the fsutil.exe command.
To check if a directory is case sensitive, run the following command:
fsutil.exe file queryCaseSensitiveInfo <path>
To mark a directory as case sensitive, or case insensitive respectively:
fsutil.exe file setCaseSensitiveInfo <path> enable
fsutil.exe file setCaseSensitiveInfo <path> disable
Actually, this depends on the API / Windows subsystem you (your program) use.
If you use the "Windows API" (the standard for Windows apps), then filenames are case-insensitive. However, if you use the POSIX subsystem (aka Windows Services for Unix), you can enable case-sensitivity.
See e.g. this MS Support article: Enable case sensitive behavior with Windows XP and Interix Subsystem or SFU
Cygwin tries to emulate Unix. Thus it needs to inherit case sensitivity to not break applications. Windows on itself isn't case sensitive. It's about the file system. You can read more about it in File system, File systems under Microsoft Windows (Wikipedia).
This is from here. You can set the
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel\ dword:ObCaseInsensitive registry value to
0 as other authors suggested. Create a file named
add.reg with the following content and run it.
Windows Registry Editor Version 5.00
Then use Cygwin to work with case-sensitive filenames.
In order to do so, you need to mount NTFS filesystems with
posix=1 option in your
/etc/fstab, as this article suggests. Here's a snippet from my
none /cygdrive cygdrive binary,posix=1,user 0 0
C: /cygdrive/c ntfs binary,posix=1,user,auto 0 0
C:/Users /home ntfs binary,posix=1,user,auto 0 0
Once the above is done, you'll be able to deal with case-sensitive filenames using
Make sure to reboot after editing both.