Page 1 of 1

Silent command line IIS website installs to wrong directory

Posted: Wed Jun 15, 2011 12:54 am
by andyc
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:

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$\Web
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:

Code: Select all

%systemdrive%\inetpub\wwwroot\MyWebApp
(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

Re: Silent command line IIS website installs to wrong direct

Posted: Wed Jun 15, 2011 10:06 am
by giaviv
Dear Andy,

Which version of InstallAware are you using?
Which version of IIS are you using?

Thanks!

Re: Silent command line IIS website installs to wrong direct

Posted: Wed Jun 15, 2011 4:49 pm
by andyc
Hi,

This is IA v10.10 under IIS 7.5 on Windows 7.

thanks,
Andy

Re: Silent command line IIS website installs to wrong direct

Posted: Thu Jun 16, 2011 8:18 am
by giaviv
Hey Andy,

I am not experiencing this on my Windows 7 machine. Please try out the attached project and let me know what results you are getting - thanks!

Re: Silent command line IIS website installs to wrong direct

Posted: Sun Jun 19, 2011 6:12 pm
by andyc
It turns out I was passing WEBSITEINDEXVAR=0 on the command line as part of the install which was messing up the paths. Not sure why that variable was not being updated when it had the default value from command line, but when I removed it the install directory works correctly.

Re: Silent command line IIS website installs to wrong direct

Posted: Sun Jun 19, 2011 6:52 pm
by giaviv
Great!