3

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

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

无法执行文件 cscript.exe mkvirtdir.vbs ...
创建过程失败;代码 2。
该系统找不到指定的文件。
4

1 回答 1

1

You are getting 'The system cannot find the file specified.' because you've provided an absolute path to the cscript.exe which is not located in the {tmp} directory. 'cscript' should already be in your PATH as it is located usually at C:\Windows\System32. From INNO Setup help file:

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.

See if removing that {tmp}\ from the filename helps.

于 2010-09-16T20:32:01.647 回答