Silent command line IIS website installs to wrong directory

Got a problem you cannot solve? Try here.
Post Reply
andyc
Posts: 10
Joined: Thu Jun 09, 2011 7:13 pm

Silent command line IIS website installs to wrong directory

Post 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
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: Silent command line IIS website installs to wrong direct

Post by giaviv »

Dear Andy,

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

Thanks!
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
andyc
Posts: 10
Joined: Thu Jun 09, 2011 7:13 pm

Re: Silent command line IIS website installs to wrong direct

Post by andyc »

Hi,

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

thanks,
Andy
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: Silent command line IIS website installs to wrong direct

Post 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!
Attachments
TestSilentIIS.zip
(358.49 KiB) Downloaded 702 times
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
andyc
Posts: 10
Joined: Thu Jun 09, 2011 7:13 pm

Re: Silent command line IIS website installs to wrong direct

Post 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.
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: Silent command line IIS website installs to wrong direct

Post by giaviv »

Great!
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Post Reply