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
@=”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
  1. Barry
    September 13, 2013 at 2:57 pm | #1

    The reg entry does not seem to work. I found this one: http://community.spiceworks.com/scripts/show_download/678

    Seems to do the trick. I simply removed the path showen there and just kept streams.exe ????

    • September 29, 2013 at 12:13 pm | #2

      The only reason this trick might not work is if you did not copy streams.exe to system32 folder…..that is the only difference between the link you provided and the code i have provided….

  2. James
    December 15, 2013 at 12:17 am | #3

    I have followed your instructions but am still not able to get this to work. I am on Windows 8.1 home edition 64bit. I used the registry changes you made and put it in a file ran it, says it added them. I put the streams file in the system32 file. But when I right mouse click and chose unblock I get the following error: This file does not have a program associated with it for performing this action. Please install a program or, if one already installed, create an association in the Default Programs control pannel. What did I do wrong?

    • December 15, 2013 at 11:37 am | #4

      I guess the method works only up to Win 7…..try this….go to programs and run Powershell 3.0. In that type the foll. command :

      gci “destination path to unblock” | Unblock-File

      I think that should do it….let me know what happens

  3. April 1, 2014 at 12:38 am | #5

    it says there is no program associated with this command

  4. Annie
    April 1, 2014 at 7:05 pm | #7

    Hello, this didn’t work for me on Win 7 Pro. I would like to undo the registry change. Please can you tell me if it’s just a case of deleting the HKEY_CLASSES_ROOT\*\shell\unblockfile key from the registry by right-clicking it and saying ‘delete’. I have never done anything like this before. Many thanks for your time.

    • April 1, 2014 at 8:41 pm | #8

      I am assuming you are the same person who commented before, then i have replied above to you. If not, tell me what the error is that you are getting and we will solve it.

  5. Annie
    April 1, 2014 at 8:48 pm | #9

    Hello Obin, no I am a different person but I am getting the same error as someone above… ‘This file does not have a program associated with it for performing this action, etc’. I also don’t have any facility in the right-click menu to unblock a whole folder with its files – I just see unblockfile when I right-click a single file.

    I would like to know if I can safely delete the registry key. I didn’t check beforehand to see whether there was a similar key to this that just needs to be amended. I don’t really want the command in the right-click menu if it’s possible to remove it and I’m not that techie to start playing around too much with things like this.

    Cheers, Annie

    • April 4, 2014 at 8:16 pm | #10

      Yes, you can safely delete the key….it does not exist on a clean install…let me know if you have any issues….

      • Annie
        April 7, 2014 at 8:27 pm | #11

        Many thanks. I have deleted it and all seems OK.

  1. April 22, 2013 at 3:16 am | #1

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 )

Google+ photo

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

Connecting to %s


Get every new post delivered to your Inbox.

Join 67 other followers

%d bloggers like this: