« Previous Next »

Thread: Cant read a IIS registry key from an MSI launch condition onto a Windows Server 2008

Last post 07-07-2009 2:48 PM by perreaultd. 6 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (7 items)

Sort Posts:

  • 07-02-2009, 7:02 AM

    Cant read a IIS registry key from an MSI launch condition onto a Windows Server 2008

    Hi! i need to have an MSI launch condition to check if the IIS6 Metabase compatibility component is installed.

    I've read over this page -> http://learn.iis.net/page.aspx/135/discover-installed-components/ the registry key i need to look at.

    My launch condition consists in reading a specific registry key (HKLM\SOFTWARE\Microsoft\InetStp\Components\Metabase) and check if the value equals the string "1".

    The problem is that my launch condition works fine on every windows version except for Windows Server 2008 where the value always equals an empty string "" even if components is installed or not.

    I did test it over a Vista x86 and it worked good. I also tested it onto a Windows 7 x64 and it also worked fine. But i im testing it over my Win2008 x64 i just can't have the registry value.

    I also tried reading the HKLM\SOFTWARE\Wow6432Node\Microsoft\InetStp\Components\Metabase key but i got the same results.

    My MSI is built from Visual Studio 2008 (and i also tried it from a Visual Studio 2010 where i got the same error). I think the error might come from the way Visual Studio reads the registry because i did a simple console application wich reads the registry key and it works fine on all windows version even my Win2008 x64.

    Does anyone of you have an idea on how i could read that registry key or is there another way to detect if the IIS6 Metabase compatibility component is installed?

  • 07-02-2009, 1:32 PM In reply to

    Re: Cant read a IIS registry key from an MSI launch condition onto a Windows Server 2008

    Same problem here!! Any help?
  • 07-07-2009, 10:34 AM In reply to

    Re: Cant read a IIS registry key from an MSI launch condition onto a Windows Server 2008

    Here's a little more detail. I tried it over again onto a Windows Vista X64 and im getting the same problem. I tried it over again onto a Windows Server 2003 X64 and im getting the same problem. I tried it over again onto a Windows Server 2008 X86 and it works fine. So it seems that it is not working on any X64 plateform except for Windows 7 X64 wich works fine.
  • 07-07-2009, 1:48 PM In reply to

    • anilr
    • Top 10 Contributor
    • Joined on 05-23-2006, 10:13 PM
    • Redmond, WA
    • Posts 2,343

    Re: Cant read a IIS registry key from an MSI launch condition onto a Windows Server 2008

    I believe that installers built using visual studio always run in wow64 mode on x64 - so when you are trying to read HKLM/Software/... you are actually getting HKLM/Software/WOW6432Node/... which is leading to your problems - I believe there is a way to make the installer run native x64, you will probably need to ask the question in a visual studio forum.

    Anil Ruia
    Senior Software Design Engineer
    IIS Core Server
  • 07-07-2009, 1:55 PM In reply to

    Re: Cant read a IIS registry key from an MSI launch condition onto a Windows Server 2008

    Hi, Ive posted my question into a Visual Studio forum too. During my tests i've also try reading the HKLM\Software\WOW6432Node and i had the same issue. Even if the appropriate registry key is written at both place. You have any idea why it works fine onto my Windows 7 workstation wich is X64 tho?
  • 07-07-2009, 2:41 PM In reply to

    • anilr
    • Top 10 Contributor
    • Joined on 05-23-2006, 10:13 PM
    • Redmond, WA
    • Posts 2,343

    Re: Cant read a IIS registry key from an MSI launch condition onto a Windows Server 2008

    Another thing to check may be to make sure that your msi is running elevated (would not cause the issue with ws03 x64 though - UAC is only from vista forward).

    Anil Ruia
    Senior Software Design Engineer
    IIS Core Server
  • 07-07-2009, 2:48 PM In reply to

    Re: Cant read a IIS registry key from an MSI launch condition onto a Windows Server 2008

    I ran it elevated and with the UAC disabled too. The msi even shows a message if not run with elevated privileges.
Page 1 of 1 (7 items)
Microsoft Communities