Windows文件居然有解锁一说,并且还会引起SignTool Error,真是昏倒!
I'm running Windows 7 and when I try to run a batch file, it says, "The publisher could not be verified. Are you sure you want to run this software?"
So when I try to sign it with my code signing certificate, it says "SignTool Error: This file format cannot be signed because it is not recognized."
So I'm stuck between a rock an a hard place. Is there a way to eliminate either message?
What you are seeing is a general prompt that Windows provides whenever you try to open any time of file that has been downloaded. What happens is that when you download a file, it is tagged with a flag that indicates that it came from the Internet and is thus potentially dangerous. When you try to run such a file, Windows checks to see if it has a valid signature in order to determine if it can be trusted.
What you can do is to strip the flag from the file by using the Unblock button in the file’s properties, after which, Windows will leave you alone whenever you try to run it:
The problem is that batch-files are text-files that can be executed. While it is possible to sign a text-file, it will end up appending a bunch of binary data to the file which for a batch-file is bad because it is gibberish and will cause problems when the command-interpreter tries to execute it. Commenting out the signature will not work either because then the signature becomes corrupt.
Therefore, signing a batch file is not going to work.
What you need to do is to figure out why the system is prompting you when trying to run it. By default, Windows does not ask before running batch-files, so you must have a either a special policy or security program blocking it. Check your security program(s) to see if there is a verification setting that you can disable or add an exclusion for.
Also check the batch-file’s contents to see if it is running an executable that is not signed (though again, by default, Windows does not prompt for executables unless it was downloaded or requires elevated privileges, so check your settings).
http://superuser.com/questions/470463/how-to-sign-a-windows-batch-bat-file
Windows文件居然有解锁一说,并且还会引起SignTool Error,真是昏倒!的更多相关文章
- windows 文件权限导致的 git 问题
windows 文件权限导致的 git 问题 在 windows 上使用 git 时,会遇到明明什么都没有改动,但是 git status 显示一堆文件被修改.这时,通过 git diff 可看到什么 ...
- Linux文件和windows文件在 换行符的区别
Linux或Unix文件,和windows文件,在来回处理时,如果不注意 换行符的区别,可能导致程序错误!!!深刻的教训.... 在早期的打印机时代,开始新的一行要占用两个字符的时间.如果到了一行的结 ...
- Linux与Windows文件传输实现
Linux与Windows文件传输实现 一.概述 在学习Linux服务器的时候,我们有时需要与Windows下的文件进行交互传输,这个时候我们需要如何实现呢?今天是我第一次在博客园上写文章,此时正值学 ...
- Linux与windows文件乱码问题
Linux与windows文件乱码问题 */--> Linux与windows文件乱码问题 Table of Contents 1. 简介 2. iconv详解 2.1. iconv –help ...
- 安装Office时出现windows installer服务不能更新一个或多个受保护的windows文件错误的解决方法
今天在Windows XP上安装Microsoft Office 2010时,总是遇到“Windows Installer服务不能更新一个或多个受保护的windows文件,安装失败,正在回滚更改”提示 ...
- office2010安装出错,windows installer服务不能更新一个或多个受保护的windows文件
转自:http://www.08lr.cn/article/1985.html office2010安装过程中出现如下图错误:windows installer 服务不能更新一个或多个受保护的wind ...
- 去掉windows文件末尾的^M: %s/\r//g
去掉windows文件末尾的^M: %s/\r//g
- Windows文件监视器 1.0 绿色版
软件名称:软件名称: Windows文件监视器 软件语言: 简体中文 授权方式: 免费软件 运行环境: Win7 / Vista / Win2003 / WinXP / Win2008 软件大小: 1 ...
- linux的wc -l 命令统计文件少一行(一般是windows文件)
先简单介绍 wc(Word Count)命令的功能为统计指定文件中的字节数.字数.行数,并将统计结果显示输出 格式:wc file 命令参数: -c 统计Bytes数(字节数),并显示文件名 -l 统 ...
随机推荐
- Oracle 11gR2 RAC Votedisk and OCR Diskgroup Recovery
check votedisk and OCR [root@vzwc1 ~]# ocrcheck Status of Oracle Cluster Registry is as follows : Ve ...
- centos无线网卡设置
联想thinkpad E430 ,安装上centos后,无线网卡一直无法使用,经历了艰苦曲折到网卡驱动安装过程,历时2个晚上终于开心到用上无线网卡. 1.查看无线网卡到具体型号 [root@local ...
- IOS的一个带动画的多项选择的控件(一)
先上效果图: 这个程序分2个层次,一个是顶部的带UITextField的bar,一个是下拉选择的view,下拉选择的view带有4个自己定义的UIView 我们先定义一个UIViewControlle ...
- [Redux] Extracting Presentational Components -- AddTodo
The code to be refactored: let nextTodoId = 0; class TodoApp extends Component { render() { const { ...
- C# 异步和委托学习
IAsyncResult是接口: IAsyncResult 异步设计模式通过名为 BeginOperationName 和 EndOperationName 的两个方法来实现原同步方法的异步调用,如 ...
- C++设计模式---Strategy模式
一.前言 学习的第一个设计模式!不知道理解的对不对,期望大家一起多交流~ Strategy模式:策略模式,定义了算法族,分别封装起来,此模式可以让算法的变化独立于使用算法的客户.Strategy模式将 ...
- Linux多任务编程——进程
进程编程常用函数 1--- fork pitd_t fork(void); 创建一个新的子进程,其父进程为调用 fork() 函数的进程: 返回值:成功:子进程返回 0,父进程返回 子进程 PID:失 ...
- 查看Oracle当前用户下的信息(用户,表视图,索引,表空间,同义词,存储过程函数,约束条件)
0.表空间 SQL>select username,default_tablespace from user_users; 查看当前用户的角色 SQL>select * from user ...
- python - XML文件及其操作
xml文件也是实现不同语言或者程序之间进行数据交换的协议,它的特点是尖括号开头,尖括号结尾.使用范围就更为广泛了,tomcat resin kvm 等等,使用了大量的xml文件来进行相关配置.先来看一 ...
- alt和title的用法区别
经常用到这两个属性,但是一直没有总结他们的区别.现在我对他们两个的用法做一下总结: 相同点:他们都会飘出一个小浮层,显示文本内容. 不同点: 1.alt只能是元素的属性,而title即可以是元素的属性 ...