Home > Smart Tip, Windows > Mass unblock Files – remove “This file came from another computer…” warnings

Mass unblock Files – remove “This file came from another computer…” warnings


Scenario : You have downloaded a file online and now whenever you try to run it, you get a security warning. You want to remove the notification from that file and a bunch of other files but do not want to do it one by one.

Solution : On Windows OS, you will find that when you download files to your local drive, they are not trusted until you go to properties and click the ‘Unblock’ button. This is OK for one or maybe two files but more than that and it goes into the “Micro$oft $ucks for not thinking about this feature” zone……and this happens to me more often than not. Usually, I download the usual libs and binaries from sites that I trust. I download it via my browser and open the files from within it, at this point I most likely dont know where the file was downloaded and if it was a zip where i had extracted it. So now if i’m stopped by windows at every step, I get really pissed at it because there is no simple way to unblock all files in a directory tree.

This problem is related to NTFS’s ability to allow alternate data streams. so what we have to do is remove the data streams. So here is a simple method to remove the streams and do a mass unblocking of files : 

1. Download the *Sysinternals* *Streams.exe* from the link below. (Remember to unblock the zip file. :P )
2. Unzip and copy streams.exe to \Windows\System32 or any other directory in your path environment variable. (This is so that when you type the below command, you do not have to point to the location of streams.exe)
3. In a command windows, use ‘cd’ to navigate to your folder. (If you do not want to do this, Hold down Shift and right-click the blocked folder.Select “Open command window here”)
4. Type the command “streams –s –d *.*” and press enter.

Here’s a way to make life even more easier by adding the above command to the context menu(so that you don’t have to type the command everytime.  But for it, you will need to modify the registry) :

Create a new text file and rename it to something like “unblocker.reg”. Copy the below registry script in it :

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\unblockfile]
@=”Unblock file”[HKEY_CLASSES_ROOT\*\shell\unblockfile\command]
@=”cmd /c streams -d \”%1\”"[HKEY_CLASSES_ROOT\Directory\shell\unblockallthefiles]
@=”Unblock the files inside”[HKEY_CLASSES_ROOT\Directory\shell\unblockallthefiles\command]
@=”cmd /c streams.exe -d -s \”%1\”"

and save the file and then double click the saved file to merge it into the registry.
After this whenever you right-click a file, you can select “Unblock file” in the context menu or you can right-click a folder and select “Unblock files in here”. Easy, right ??
About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 61 other followers

%d bloggers like this: