In Windows 7+8+10, Right-clicking a drive and selecting Properties in Windows gives an option that is checked by default:
"Allow files on the drive to have contents indexed in addition to file properties"
When this is UNCHECKED, all of the files and folders on the drive have the +I attribute set which tells Windows these are "not content indexed".
There are no registry changes when UNCHECKING the option.
Creating a new file or folder on the drive and querying its attributes with "attrib file-or-folder-name" shows the +I attribute is set for NEW files and folders. This means checking the "Indexing" BOX in Windows GUI Drive Properties doesn't JUST set the attributes of all the files on the drive. It also makes it so NEW files and folders automatically get the +I attribute.
I then tested loading the virtual hard drive in another Virtual Machine. And the "Indexing" item in the drive properties was still UNCHECKED. The means that the Drive Properties "Indexing" setting is stored on the drive itself and not in Windows.
I tried using command line to set the attributes for the whole drive to +I but it only works for the current files and folders.
attrib /d /s +I D:\*
After the +I is set it does not uncheck the "Indexing" box in Drive Properties and new files and folders don't have the +I attribute on the drive automatically.
How can the "automatic +I attribute setting" for the whole drive be set in the same way that UNCHECKING the "Indexing" checkbox in the Drive Properties GUI dialog does? It would be nice to be able to do this from command prompt if possible.
Note: I think this may be similar to changing a label on a drive which is also a setting stored on the drive itself. Here is a program which allows drive label changing from the command prompt:
Is there a similar command line utility to change the global drive setting which automatically sets the +I attribute or can this be done in Windows Command Prompt natively?