Recursively Unblock Assemblies with Streams
10 Sep 2009Ever since my recent blog post Unblocking Assembly Due to AspNetHostingPermission Security Exception I have been pretty careful about unblocking Assemblies after downloading them from the internet.
However, today I decided to download the MVCContrib.Extras.release.zip which has over 100 assemblies, pdbs, and xml files of which ALL are blocked by Windows 7!
Since there is no way to multi-select and unblock the files at once, I shuttered at the thought of right-clicking each file and unblocking them one by one. There has to be a better wayโฆ and to my fortune there is :)
The answer is yet another useful too from Sysinternals called Streams.
Streams is a command line tool that lets you unblock one or more files at a time and you can even recursively perform unblocks! Yippee
Immediately I started to look for a feature to right-click folder option to open a command prompt at that location (like I used to with the Open Command Window Here Microsoft Power Tool for Windows XP).
I didnโt see an Open Command Window Here context menu for Windows 7 when I initially right-clicked on a folder, so I decided to do some quick research to see what is the best way to do this in Windows 7.
I was pleased to find that the feature is native in Windows 7, but I had just missed it.
It turns out that if you Shift-Right-Click on a folder then an "Open Command Window Hereโ context menu will appear! Apparently, this was a feature of Windows Vista too, but as I mentioned in a previous postโฆ I upgraded immediately from Windows XP to Windows 7.
So, (after downloading Streams and registering it in my System Path Variable) I quickly typed in the following command to save the day.
streams โs *.*
Using Streams
Usage: streams [-s] [-d]
</strong></p> -s
Recurse subdirectories.-d
</blockquote>
Delete streams.
Streams takes wildcards e.g. 'streams *.txt'.ย
Anyway, I didnโt know about either the Streams command line too or the Shift-Right-Click โOpen command window hereโ feature of Windows 7 and thought I would share them with you. Hopefully, they help someone ;) If not, it will help me remember them in the future.ย