iis - 如何使用 cscript 和 vbs 参数从 Inno Setup 脚本调用 vbs 脚本?

标签 iis iis-6 inno-setup wsh

以下是我用来尝试在 IIS 6 中创建虚拟目录的条目:

[Run]
Filename: {tmp}\cscript.exe mkvirtdir.vbs; Parameters: "-c LocalHost -w ""Default Web Site"" -v ""ectUpload_Server""", {app},""ectUpload_Server"""; WorkingDir: {tmp}; Flags: skipifdoesntexist; StatusMsg: Creating IIS Virtual Directory"

运行安装程序时出现以下错误:

Unable to execute file cscript.exe mkvirtdir.vbs ...
CreateProcess failed; code 2.
The system cannot find the file specified.

最佳答案

您收到“系统找不到指定的文件。”因为您提供了 cscript.exe 的绝对路径,该路径不在 {tmp} 目录中。 “cscript”应该已经在您的 PATH 中,因为它通常位于 C:\Windows\System32。来自 INNO 安装程序帮助文件:

Temporary directory used by Setup or Uninstall. This is not the value of the user's TEMP environment variable. It is a subdirectory of the user's temporary directory which is created by Setup or Uninstall at startup (with a name like "C:\WINDOWS\TEMP\IS-xxxxx.tmp"). All files and subdirectories in this directory are deleted when Setup or Uninstall exits. During Setup, this is primarily useful for extracting files that are to be executed in the [Run] section but aren't needed after the installation.

看看从文件名中删除 {tmp}\是否有帮助。

关于iis - 如何使用 cscript 和 vbs 参数从 Inno Setup 脚本调用 vbs 脚本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1843598/

相关文章:

ASP.NET MVC + jQuery + IIS6 : Multiple Ajax requests

inno-setup - 如何将参数传递给 Inno Setup 命令行编译器?

c# - 为什么某些证书的 Request.ClientCertificate 为空,而其他证书则为空?

asp.net-mvc - 如何在 IIS 6.0 中设置正确的小数点分隔符?

powershell - 通过Powershell将安全权限附加到文件夹

Powershell : How to create IIS 6 Virtual Directory/Web application under a Subfolder

debugging - 创新设置 : How to watch variables values or write to debug output?

inno-setup - 在所有文件的源路径之间选择

c# - 在 MVC5 应用程序上强制使用 HTTPS 时出现 ERR_TOO_MANY_REDIRECTS

debugging - 未知的应用程序域