How to detect IIS6 metabase option in launch condition on Vista and Server 2008?

Last post 06-12-2009 5:27 AM by permb. 4 replies.

Sort Posts:

  • How to detect IIS6 metabase option in launch condition on Vista and Server 2008?

    06-08-2009, 2:06 AM
    • Member
      12 point Member
    • permb
    • Member since 06-08-2009, 2:02 AM
    • Posts 4

    The web deployment projects developed in VS2008 seem to require some of the IIS6 compatibility options to be installed, e.g. the IIS6 metabase compatibility.

    Since the error message is less than clear, I was wondering if anyone knows how to detect this items in a launch condition.

    And no, switching to WiX or InstallShield (yuck) is not an option although the lack of progress in the VS deployment projects is forcing me that way I guess...

    Thx,

    Per

  • Re: How to detect IIS6 metabase option in launch condition on Vista and Server 2008?

    06-11-2009, 3:14 AM

    Hi,

    If you want to check whether the component of IIS 7 is installed on target machine, you can use "Search Target Machine" with Register search and then use "Launch Conditions" to determine whether install application.

    Because IIS 7 will publish registry keys that show whether any given IIS module has been installed.

    For more information, see http://learn.iis.net/page.aspx/135/discover-installed-components/ (Section: IIS 6 Management Compatibility).

     

    I look forward to receiving your test results.

    Thomas Sun
    Microsoft Online Community Support

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question.
  • Re: How to detect IIS6 metabase option in launch condition on Vista and Server 2008?

    06-11-2009, 4:58 AM
    • Member
      12 point Member
    • permb
    • Member since 06-08-2009, 2:02 AM
    • Posts 4

     I did some investigation on a Vista64 machine and since setup.exe is 32-bit this cannot be made to work...

    The Components key is in the 64-bit version of HKLM\Software and as far as I can tell there is no way to read that data without low-level registry calls. The Launch condition available in Visual Studio would be impossible to write so that it can handle both 32 and 64-bit OS's.

    See the comment on the following article:

    http://msdn.microsoft.com/en-us/library/ms724072(VS.85).aspx

    excerpt:

    Note: When using the registry API (e.g., RegOpenKeyEx and RegEnumKeyEx) in a 32-bit application, Wow6432Node acts like a symbolic link that loops back to the same 32-bit hive. It does not map into the 64-bit hive as you might think.

    For example, walking the registry tree down to HKLM\Software\Wow6432Node in a 32-bit application loops back to HKLM\Software. The result is infinite recursion: HKLM\Software\Wow6432Node\Wow6432Node\Wow6432Node\..., etc.

    If you want to view the 64-bit registry hive in 32-bit code you must open HKLM\Software using KEY_WOW64_64KEY. Do not try to open Wow6432Node; it will not work.

    As a general rule you should ignore any result from RegEnumKeyEx that returns "Wow6432Node". It is a magic name that triggers special behavior by the registry API.

     

    I'd be happy to be proven wrong

  • Re: How to detect IIS6 metabase option in launch condition on Vista and Server 2008?

    06-11-2009, 10:33 PM
    • Participant
      834 point Participant
    • Nowall
    • Member since 12-19-2007, 9:53 AM
    • Posts 108

     You can compile your Web setup project in two versions, one for 32bit and the other for 64bit. So you can check register separately.


    Please make the reply as answer if it helps!
  • Re: How to detect IIS6 metabase option in launch condition on Vista and Server 2008?

    06-12-2009, 5:27 AM
    • Member
      12 point Member
    • permb
    • Member since 06-08-2009, 2:02 AM
    • Posts 4

    Yes I guess I could to that but it would make the project more complex since the target platform is a project setting and not an output setting - essentially forcing me to have two projects (32 and 64-bit) to have to sync (unless there is a secret command line version of the .vdproj engine that allows target platform as a command line parameter).

    That MS chose to make it impossible to read the 64-bit registry from a 32-bit process is beyond me.

    I think I'll continue to solve this by large letters in the installation manual.

    BTW does anyone know exactly what components the Web installation projects require? My application runs happily without them - it is just the installer itself that hasn't been updated to work properly with Vista and W2K8.

    /P

Page 1 of 1 (5 items)