File Properties in Windows Vista

When you copy files from Windows XP or Windows Server 2003 operating systems to Windows Vista you will see that the properties are arranged differently and some are missing. In particular the file properties gathered in the "Summary" tab have missing values. If you programmatically manipulated the properties through the Shell32 API it will work fine in XP but will not work in Vista.

Vista File Properties

Figure 1. File Properties for the same physical file show in the Windows XP and Windows Vista Shell.

The explanation is that in Windows Vista the support for secondary NTFS stream properties has been dropped from the Shell. This is because if the file is send via e-mail or copied to non- NTFS file system (a lot of pen drives are formatted as FAT) these properties are lost anyway. So in Vista the file properties have been reengineered to be stored with the physical file and require a property handler. Vista has a number of built in property handlers for certain formats, for example OLEDoc File that you can register for a given file extension but only if the file has been stored in this format.

But is there any alternative to Shell32 API to get your program working in Vista if it needs to manipulate the secondary NTFS stream properties? After all Vista uses NTFS file system and the file properties are still there (you can make sure by creating a network share on Vista and viewing the file with XP client machine. Following document describes the alternative and has source code sample for accessing the properties

"The Dsofile.dll files lets you edit Office document properties when you do not have Office installed"

https://support.microsoft.com/?kbid=224351

Of course if you are migrating your application to Vista, it is recommendable to remove the dependency of your application on these properties but there may be scenarios where this is not possible and where the above article provides you with a workaround.