如何使用 cscript 和 vbs 参数从 Inno Setup 脚本调用 vbs 脚本?
以下是我用来尝试在 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.
The following is an entry I'm using to attempt to create a virtual directory in 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"
I get the following error when I run the setup:
Unable to execute file cscript.exe mkvirtdir.vbs ... CreateProcess failed; code 2. The system cannot find the file specified.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您收到“系统找不到指定的文件”。因为您提供了 cscript.exe 的绝对路径,该路径不在 {tmp} 目录中。 “cscript”应该已经在您的 PATH 中,因为它通常位于 C:\Windows\System32。来自 INNO 安装程序帮助文件:
看看从文件名中删除 {tmp}\ 是否有帮助。
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:
See if removing that {tmp}\ from the filename helps.