English 中文(简体)
How do I call a vbs script from Inno Setup script with cscript and vbs arguments?
原标题:

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.
问题回答

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:WindowsSystem32. 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:WINDOWSTEMPIS-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.





相关问题
Session Management with Windows Authentication

In an ASP.NET web app, using Integrated Windows Authentication, is the session tied to the windows identity? In other words, if I login (using IWA) to the app, and the app stores some "stuff" in my ...

Using Elmah with Cassini

Does anyone know if I can use Elmah with Visual Studio build-in web server(aka Cassini)? I get it working easily on IIS, but using same configuration, it doesn t work with Cassini. When I requested ...

Setting hostname in IIS, include www?

I want to set the hostname for a website I m adding in IIS 7, however do I include the www in the hostname or not? because I want both www.mysite.com and mysite.com both to point to mysite on the ...

inetpub versus any other folder

I ve run websites out of inetpub, as well as from folders just residing on the C: drive. I wonder, are there any definitive advantages to running websites out of inetputwwwroot?

IIS 6.0 hangs when serving a web-service

I am having issues with one of our web-services. It works fine on my development machine (win XP) whether I host it as a separate application or using cassini from Visual studio. Once I deploy on the ...

热门标签