Recursively Unblock Assemblies with Streams

MvcContribEver 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).

ShiftRightClick

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
Delete streams.
Streams takes wildcards e.g. 'streams *.txt'.

</blockquote>

ย 

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.ย 

If you enjoyed this post, please consider sharing it with others via the following Twitter or Reddit buttons. Also, feel free to checkout my egghead.io profile page for addition free and subscription lessons, collections, and courses. As always, you can reach out to me on Twitter at @elijahmanor. Thanks and have a blessed day!

Reddit