views:

364

answers:

1

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.
A: 

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.

CodeMonkeyKing