Extended attributes of a file, listed under summary tab in properties of a file become inaccessible via shell.Application object

Extended attributes of a file, listed under summary tab in properties of a file become inaccessible via shell.Application object after installation of SP 2. Code written in asp page, accessing extended properties of files stops fetching the extended properties. This is a result of the fix that was included in Ms06-015 and included in SP2.

908531 MS06-015: Vulnerability in Windows Explorer could lead to remote code execution

http://support.microsoft.com/default.aspx?scid=kb;EN-US;908531

Shell.Application.GetDetailsOf() is used for accessing the attributes.

Following is a sample asp code written to print out all the attributes.

Test.asp

<%
Dim arrHeaders(34)

Set objShell = CreateObject("Shell.Application")

Set objFolder = objShell.Namespace("<Physical path of folder containing Files>")

For i = 0 to 33

arrHeaders(i) = objFolder.GetDetailsOf(objFolder.Items, i)

Next

For Each strFileName in objFolder.Items

For i = 0 to 33

Response.Write( i & vbtab & arrHeaders(i) & ": " & objFolder.GetDetailsOf(strFileName, i) & "<br>")

Next

Next

%>

This code fails to list the extended properties such as dimensions, width, height for an image file such as jpg, jpeg, gif.

How to fix this problem?

You will have to modified the registry to fix this issue.

Copy the below lines, paste them in a text file and save the file as .reg file. Use this file to add the appropriate key in the registry. You can also manually add the registry key,

ShellExtension.reg

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Cached]

"{eb9b1153-3b57-4e68-959a-a3266bc3d7fe} {0000010B-0000-0000-C000-000000000046} 0x401"=dword:00000001

Any changes to the registry need to be done with an awareness of the impact. There is always the chance that some tool, or another administrator, needs this to be at the default setting.

Warning: You can edit the registry by using Registry Editor (Regedit.exe or Regedt32.exe). If you use Registry Editor incorrectly, you can cause serious problems that may require you to reinstall your operating system. Microsoft does not guarantee that problems that you cause by using Registry Editor incorrectly can be resolved. Use Registry Editor at your own risk.

Hope this helped you in some way