以下是我用来尝试在 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/