Silent command line IIS website installs to wrong directory
Posted: Wed Jun 15, 2011 12:54 am
Hi,
Another problem I am getting only when running my installer in silent from the command line.
I'm installing an IIS website using the following code:
This works correctly when the installer is run interactively, but I run from the command line in a silent install the website is always configured with the following path:
(where MyWebApp is passed in from the command line).
I'm passing in TARGETDIR from the command line and the files are correctly being installed in that directory, but IIS always gets configured with the wrong path when run from the command line. I've logged the output from the silent install and the interactive install but can't see any significant difference - I can't work out where it is getting the constant value "%systemdrive%\inetpub\wwwroot" from. Help!
Andy
Another problem I am getting only when running my installer in silent from the command line.
I'm installing an IIS website using the following code:
Code: Select all
Comment: Update the IIS metabase only if the main setup feature has been selected
Get IIS Index for Site "$WEBSITE$" into WEBSITEINDEXVAR
if Variable WEBSITEINDEXVAR Equals 0
Comment: Create the new website only if it doesn't already exist
Create IIS Site "$WEBSITE$"
Get IIS Index for Site "$WEBSITE$" into WEBSITEINDEXVAR
end
Comment: Create the virtual folder
Create Virtual Folder "$FOLDER$" in IIS Site #$WEBSITEINDEXVAR$, pointing to physical location $TARGETDIR$\WebCode: Select all
%systemdrive%\inetpub\wwwroot\MyWebAppI'm passing in TARGETDIR from the command line and the files are correctly being installed in that directory, but IIS always gets configured with the wrong path when run from the command line. I've logged the output from the silent install and the interactive install but can't see any significant difference - I can't work out where it is getting the constant value "%systemdrive%\inetpub\wwwroot" from. Help!
Andy