Wednesday, April 10, 2013

Corflags Shell Extension

When doing .NET development, particularly for both x64 and x86 platforms, it is often useful to use Corflags.exe to view/modify the PE header of a *.dll file. To make this more convenient, I created a Windows Explorer shell extension so I can right-click a *.dll file and click "Show Corflags" to see the corflags output for the *.dll.

Open Notepad and paste in the following (make sure the path to Corflags.exe is correct for your machine):

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\dllfile\shell]
[HKEY_CLASSES_ROOT\dllfile\shell\Show Corflags]
[HKEY_CLASSES_ROOT\dllfile\shell\Show Corflags\command]
@="cmd.exe /k \"C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A\\Bin\\Corflags.exe\" %1"

then save as a *.reg file. Double-click the *.reg file to add the registry keys to your registry.

No comments:

Post a Comment