Alan's Blog

"Yeah. I wrote a script that will do that."

Menu
  • About My Blog
Menu

Remove “Open File” security warning for files downloaded from the internet

Posted on April 16, 2009March 11, 2016 by Alan

I needed a list of my DHCP servers, so I went looking for my DHCPServers.vbs script, which I wrote for that purpose.  Gone.  I remembered that I posted it on www.myITForm.com, and so I downloaded the script from there http://www.myitforum.com/inc/upload/11431DHCPServers.vbs.txt (right click, then save target as).  I went to run my script and I got this:

 Open File Security Warning screen cap

This data I suspected existed in the NTFS stream for the file.  So I downloaded a copy of the Sysinternals file streams.exe from http://technet.microsoft.com/en-us/sysinternals/bb897440.aspx.  When I looked at the streams I found this:

 

C:\>streams “C:\myprofile\desktop\11431DHCPServers.vbs”

Streams v1.56 – Enumerate alternate NTFS data streams
Copyright (C) 1999-2007 Mark Russinovich
Sysinternals – www.sysinternals.com

C:\myprofile\Desktop\11431DHCPServers.vbs:
   :Zone.Identifier:$DATA       26

I obviously suspected the zone.identifier, and reran streams with the -d command, which deleted the stream.  When I went to open the file, I was no longer asked whether I trust the script that I wrote.  I then ran the delete command on my script folder:

streams -s -d z:\scripts

 

 

Tags: NTFS+Streams, downloaded+files, DHCP+Servers

Leave a Reply

You must be logged in to post a comment.

Search

Please Note

All the scripts are saved as .txt files. Newer files have a “View Script” button which will let you save or open a script in notepad. For earlier posts, the easiest way to download with IE is to right click on the link and use “Save Target As”. Rename file from Name_ext.txt to Name.ext.

To see a full post after searching, please click on the title.

PowerShell Scripts were written with version 3 or later.

https connections are supported.

All new users accounts must be approved, as are comments. Please be patient.  If you find a post error or a script which doesn’t work as expected, I appreciate being notified.  My email is my first name at the domain name, and you are welcome to contact me that way.

Tags

1E ACLS Active Directory ActiveDirectory ADSI Advanced Functions Audit Change Administrator Password COMObject Computer Groups DateTime Desktop DNS Excel FileScriptingObject Forms General GPO GPS Group Policy Hacks ISE Lockout logons NAV740 Nessus OU OU permissions Outlook Pick Folder Power PowerShell Powershell Scriptlets RDP SCCM schedule reboot Scripting Security Shell.Application user information VBA Windows Update WMI WordPress WPF

Categories

akaplan.com

  • Back to Home Page

Archives

Scripting Sites

  • A Big Pile of Small Things
  • Adam, the Automator
  • Art of the DBA
  • Ashley McGlone
  • Boe Prox
  • Carlo Mancini
  • DexterPOSH
  • Doug Finke
  • Jaap Brasser's Blog
  • JeffOps The Scripting Dutchman
  • Jonathan Medd's Blog
  • Keith Hill's Blog
  • LazyWinAdmin
  • Nana Lakshmanan
  • PowerShell Magazine
  • PowerShell Team Blog
  • PowerShell.org
  • PwrShell.net
  • Richard Siddaway's Blog
  • Ryan Yates' Blog
  • Skatterbrainz
  • The Lonely Administrator

SQL Site

  • Art of the DBA

Meta

  • Register
  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
©2025 Alan's Blog | Theme by SuperbThemes

Terms and Conditions - Privacy Policy