mgorga
Posts: 45
Joined: Fri Jun 03, 2011 1:00 pm

IIsWWWRootFolder is empty when IIS is not installed

Dears,
our installation is using Windows Features Bundle to automatically install the IIS. Moreover, it is possible to chose the installation path, so we are using the property folder IIsWWWRootFolder to determine the APPDIR. The problem is that if IIS is not installed on the machine (I normal situation for us), then the path for APPDIR is initialized as C:\APPDIR\. I tried to assign the folder with a search on the registry (\HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\INetStp\PathWWRoot) but this search fails if IIS isn't installed. So our approach is to use a fixed value C:\Inetpub\wwwroot for the folder but then, it fails if IIS is installed in an other folder.

How can I use the property IIsWWWRootFolder and, if the IIS isn't installed, initialize the property with the value C:\Inetpub\wwwroot\ ?

Best regards,
Mario

PD: we are using Advanced Installer 10.6 and Windows Server 2008 or 2012
Dan
Posts: 4513
Joined: Wed Apr 24, 2013 3:51 pm

Re: IIsWWWRootFolder is empty when IIS is not installed

Hi Mario,

In order to achieve that you can add our predefined Set Installer property custom action with sequence and set the IIsWWWRootFolder property to your desired value C:\Inetpub\wwwroot\ .

Also you can condition the execution of this custom action, so it should be executed only if the IIsWWWRootFolder property is empty. So, you can just use IisWWWRootFolder parameter in the Condition field of the custom action's property. Please note that this custom action should be added before the CostInitialize standard action.

Please let us know if that helped.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”