Announcement

Collapse
No announcement yet.

IIS Web Application Walk-through?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • IIS Web Application Walk-through?

    I am evaluating MSI Factory to ensure I can build MSI install files for many different IIS Web Applications. I started with a pretty simple test case site from Visual Studio. However I can not find any documentation like "getting started with IIS". My repeated searches of the forum and documentation has revealed nothing so far.

    Is there anything at all like the "Creating you first installer" for a Web Application? It does not need to be a video, I just have found nothing so far.

  • #2
    I do not have a "Web Application" which I could use in my walktrough, so I use the "Web Site" instead. The "Create Web Application Pool" has some different parameters of course, but the essence of using it in MSI Factory is the same.
    • As you cannot install a web site (or a web application) on a computer where IIS is not installed, you should make sure that the required technology is already available on the target, or you will get unhelpful error messages.

    • First, add a Registry Search. See the Requirements pane in the left column, or use Project > Searches, and add a Registry search.
      Property ID: IISVERSION
      Default value: #0
      Root: HKEY_LOCAL_MACHINE
      Key name: SOFTWARE\Microsoft\INetStp
      Value name: MajorVersion


    • Once you have this, add a Launch Condition. Again, you find this in the Requirements pane on the left, or via Project > Launch Condition. You can add a custom condition like this:
      Condition: IISVERSION>"#4" Or Installed
      Message: This setup requires that the IIS windows component is installed.
      (or anything else)
      This condition will stop the installation if IIS can't be detected. During an uninstallation, it doesn't matter which version of IIS is present.

    • Alternatively, if IIS isn't installed, you could enable it via pkgmgr or using DISM in a deferred custom action. (I won't demonstrate this.)

    • To keep this as simple as possible, I just add a single HTML file to the installer project.

    • In the Extensions pane, open IIS, and use Add > Create Web site.

    • Set the Web Site properties as desired, adjusting port, auto-start, etc.

    • On the Directory tab, point to the folder where the HTML is about to be deployed.

    • Build the MSI, there shouldn't be any errors.

    • If you process the MSI on a computer where no IIS is installed, you will get the error message:

      Click image for larger version

Name:	SNAG-2014-01-16-01.png
Views:	1
Size:	7.9 KB
ID:	284140

      If the component is not installed, the user should go to the "Turn Windows features on or off" applet and enable it before trying again:

      Click image for larger version

Name:	SNAG-2014-01-16-02.png
Views:	1
Size:	25.4 KB
ID:	284141

    • If there is IIS installed, then the MSI should process properly. Afterwards, you can open the IIS Manager and check that the web site was correctly set up:

      Click image for larger version

Name:	SNAG-2014-01-16-03.png
Views:	1
Size:	45.6 KB
ID:	284142

    • Uninstall, and verify that the web site is correctly removed, returning the system to its previous state.


    These are the basic steps. If you are having problems, post your project file and the log where you are encountering errors - the build log and/or the installation log files.

    Ulrich

    Comment


    • #3
      I am having issues with the Folders for the Create Web Site step. By default it is attempting to target ProgramFileFolder, however this creates security issues. None of the other available Folder groups appear to be appropriate either. The default is C:\inetpub\wwwroot with all installers I have used in the past. This folder is created when the IIS features are installed on a system.

      I tried to create a folder group, but this just resulted in an error on build for unreferenced folders.

      Comment


      • #4
        I explained how to install files into a custom folder in this thread. If this does not help and you want assistance, please post the project file.

        Ulrich

        Comment

        Working...
        X