Open file - Security Warning when Running Script
Question:
I purchased winbatch about a month ago and have compiled exe files to run through the HEAT call logging application. The problem
I’m now having is that every time a user needs to execute the winbatch file, they get a windows security warning titled 'Open file - Security warning'
and need to physically click on “run” to execute the file. I need these files to run automatically.
Answer:
When you run a script, batch file or an executable directly from a network share, the 'Open file - Security warning' dialog may appear.
To prevent this prompt from appearing, use one of the following methods.
Option 1: Enable the Include all network paths (UNCs) setting in Internet Options applet.
- Click Start, Run and type INETCPL.CPL
- Select the Security tab, Local intranet
- Click Sites button
- Put a checkmark near the following option: "Include all network paths (UNCs)". Network paths (for example, \\local\file.txt) are typically used for local network content that should be included in the Local Intranet zone. If there are network paths that should not be in the Local Intranet zone, you should clear this option and use other options to designate files that are assigned to the Local Intranet zone.
Note: If you've installed Internet Explorer 7 Beta, you may need to first uncheck the option Automatically detect intranet network option in Local intranet zone settings.
Option 2: Add the IP / fully qualified domain name (FQDN) of the network computer to your Local Intranet or Trusted sites zone in Internet Explorer.
- Click Start, Run and type INETCPL.CPL
- Select the Security tab, Trusted sites
- Click Sites button
- Add the IP / FQDN of the remote PC to the Intranet (or) to Trusted sites
- Click OK, OK and close the dialog
Option 3:
Copy the file to a FAT partition and back will also strip out the alternate data streams.
Option 4:
You can get rid of the warning cause by the zone stream created with IE downloads with FileDelete. If I recall correctly, it looks something like this
FileDelete(StrCat(strFile,":zone.identifier"))
See Also: Files Alternate Data Stream UDFs
Article ID: W17044
File Created: 2014:07:18:09:51:38
Last Updated: 2014:07:18:09:51:38