windows - 如何在 Vista 中从网络共享运行批处理文件而不出现警告对话框?

标签 windows windows-vista

The publisher could not be verified. Are you sure you want to run this software?

如何在启动时自动运行此bat文件而不被弹出窗口阻止?批处理文件位于另一台计算机的网络共享上。

最佳答案

预计到达时间:您在评论中提到,从网络中的另一台计算机运行批处理时会出现这种情况。在这种情况下,文件来自的区域几乎是不言而喻的,不需要位于流中。您可以按照以下步骤删除该警告:

  1. 打开 Internet Explorer 的1 Internet 选项
  2. 点击“安全”选项卡
  3. 选择“本地 Intranet”区域
  4. 点击“网站”按钮
  5. 点击“高级”按钮
  6. 添加您运行批处理的计算机的网络名称,如下所示:

    file://computername

This will cause the specified computer to count into the "Local intranet" zone which won't trigger the warning as you have chosen to trust it.

(Thanks to the How-To Geek on this one.)


For local batch files, the solution is not hard:

Batch files don't have digital signatures and, to my knowledge, can't have them. What you're seeing is likely the result of downloading the batch file from a website. This causes an Alternate Data Stream named Zone.Identifier to be created. You can remove this by choosing "Unblock" in the properties of the file

Illustration of the "Unblock" button in the properties dialog

or by redirecting nothing2 into the stream:

echo.>foo.cmd:Zone.Identifier

1 它们部分适用于整个系统,部分特定于 IE。

2 或者至少资源管理器不会将该流识别为有效内容。

关于windows - 如何在 Vista 中从网络共享运行批处理文件而不出现警告对话框?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1248171/

相关文章:

c# - Windows、.NET 读取鼠标光标下的文本

c# - 从Windows中的立体声混音中获取声音样本

c - 如何向另一台电脑发送通知?

windows - Powershell DSC Pull Server 抛出内部错误 - Microsoft.Isam.Esent.Interop not found

c# - 为什么我的 Windows C# 服务崩溃?

c# - 在 UWP 中设置密码框的对齐方式

java - 无法在 Vista 上从 HKEY_LOCAL_MACHINE 读取配置数据

winapi - GetUserDefaultLocaleName() API 崩溃

windows-vista - 无法使用 MinGW 编译 - 缺少 libmpc-2.dll

windows-vista - SBCL 在 Vista 上崩溃。你知道如何让它发挥作用吗?