为什么appcmd.exe在batch file中执行时行为有所不同?
我有以下appcmd添加到IIS7的ISAPI和CGI限制的exception。 我添加的exception应该是这样的: c:\perl\bin\perl.exe "%s" %s 这里是命令行: appcmd set config -section:isapiCgiRestriction "-+[path='c:\perl\bin\perl.exe \"%s\" %s', allowed='true', description='Perl CGI']" 如果从命令行执行此操作,则可以正确执行此操作,但是如果在.cmdbatch file中执行此操作,则path会变形并最终显示为: c:\perl\bin\perl.exe "s 麻烦似乎出现,因为我不得不绕第一个%s perl.exe参数引号。 但是为什么这个在batch file中的行为应该是不一样的。 任何人都可以解释为什么这是发生?