9

I like to study a lot of code from various sources from around the internet, and a big part of that involves downloading and opening the files to view the source code.

Now every time I try to open these files it gives me a prompt to make sure that the file is from a valid source and that I trust it to run.

There are many answers on this site, that deal with this issue on the following OS; Vista, XP and 7, but I couldn't find one for 8, and I could not get any of the others to work!

Could someone please tell me how to disable this very annoying feature for someone like myself?

An Dorfer
  • 1,178
CarlG
  • 305

6 Answers6

3

I had a very similar problem on my brand new Windows 8 laptop. The desktop icons (.lnk)'s gave the same "open file security warning". Don't know why or what happened but what a pain. I finally found a solution, at least for the desktop icons doing it. I didn't want to fix it with changes to IE10 settings, like some suggest, because that just seemed risky.

This worked for me:

  1. Press Windows button + X to open the Tools menu
  2. Select: Command Prompt (admin) to open the black DOS window with C:\Windows\system32\>
  3. Enter

    cd \Users
    

    The display now says C:\Users>

  4. Enter (replacing "YourName" with your username)

    cd YourName 
    

    The display now says C:\Users\YourName>

  5. Enter

    cd Favorites 
    

    The display now says C:\Users\YourName\Favorites>

  6. Enter

    cd Desktop 
    

    The display now says C:\Users\YourName\Favorites\Desktop>

  7. Type and enter:

    C:\Users\YourName\Favorites\Desktop>ICACLS *.LNK /L /SETINTEGRITYLEVEL MED
    

All the links on your desktop should come up as:

processed file: whatever.lnk
successfully processed 10 files; Failed processed 0 files.

Sorry for the long hand on the DOS commands, I remember them from back in the day but, this is laid out for anyone to easily follow.

random
  • 15,201
2

Add a system environmental variable SEE_MASK_NOZONECHECKS and set the value to 1.

Make sure it's a system level variable or it will go away on reboot.

Use of Environment Variable in Windows 8

Techie
  • 121
2
@setx see_mask_nozonechecks 1

typing it in the command prompt, or executing inside a batch file will create the environmental variable that Dasun mentioned, for the current user

1

Changing the environment variable SEE_MASK_NOZONECHECKS as mentioned by other answers is the way to go. I will explain here more details. It has advantages because it does not only take away the "downloaded by internet" flag as the "ICACLS myfiles.* /L /SETINTEGRITYLEVEL MED" command or similar methods, but also work, if files are started from an unsafe network drive like UNC paths.

But the interesting point is, how to set this environment variable:

  1. If you need this only for setup, which should run unattendedly on foreign machines, it would be unsafe to change this variable permanently. But you can change it temporarily in your process before you start the setup, e.g. in a batch file with "SET". By default the environment is inherited to the child processes, for example started in the same batch.

  2. The environment is user specific. If the user has no admin rights or the behaviour should be changed only for one user, take the command already mentioned:

    setx see_mask_nozonechecks 1

  3. If you want to change the behaviour not only permanently, but also for all users (whole machine), add a /m parameter to the command line:

    setx see_mask_nozonechecks 1 /m

One more remark: With Windows Server 2012 R2 I do not get the warning when accessing a remote (non-domain) drive like a VMWare shared drive at all. I have needed this trick only under Windows Server 2008 R2 and before (also with Win7/8).

Philm
  • 146
0

You should be able to resolve this by seting up trusted sites properly?

Other wise, try this.

Close internet explorer
Open up a cmd prompt
cd "\Program Files\Internet Explorer"
set SEE_MASK_NOZONECHECKS=1
iexplore

This allows the file to open directly from Internet Explorer, however the file on disk will still be 'blocked'.

One other solution is to open the files directly from your text reader, i.e Notepad++. It is explorer that is enforcing the warning.

See: "This file came from another computer..." - how can I unblock all the files in a folder without having to unblock them individually?

Michael
  • 182
  • 7
0

Simple PowerShell command to fix such files:

Unblock-File -Path

This essentially removes the ADS which IE slaps while downloading from other sources. Also helpful is the following script if you wish to search and remove all blocked files download in a folder:

#Search and unblock all files recursively
$p="C:\Download Folder\*"

$c=gci -Path $p -Recurse | gi -Stream "Zone.Identifier" -ErrorAction SilentlyContinue
foreach ($f in $c)
    {Unblock-File $f.FileName}