I have a setup that installs a 32 bit web app -
The setup needs to find if specific IIS components are installed for IIS 7.0
On 32 OS we can find this information in the registry
on 64 bit OS - the information is not reflected in the WOW64 registry info
We would like to ship one setup that installs this app on 32 OR 64 bit - how can I find the IIS 7 component information on a 64 bit OS
The only solution that I've found is to use managed code that is compiled natively that I launch as a custom action. However, Microsoft does not recommend to use managed code in a msi installer.
Does anyone have a solution to make this work without creating a 64 bit installer?
I've tried SystemSearch, a custom c++ dll, a WISE script, none of them work because they all search the 32-bit registry.
Thank you for your help.
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Detecting IIS on Vista 64 bit OS
Started by
anitalf
, Apr 01 2008 16:12
1 reply to this topic
Posted 06 August 2008 - 06:34
We recently done this in an InstallScript custom action by setting the REGDB_OPTION_WOW64_64KEY flag in the REGDB_OPTIONS (this is documented in the help). Note the Flag is ignored if it is run on a 32-bit machine.
here's the code:
here's the code:
CODE |
bRequiredAuthenticationFound = FALSE; sIISComponentReg = "SOFTWARE\\Microsoft\\InetStp\\Components"; nCurrREGDB_OPTIONS = REGDB_OPTIONS; // Check required authentication. If it is a 64 bit machine // Look at the 64-bit part of the registry. REGDB_OPTIONS = REGDB_OPTIONS | REGDB_OPTION_WOW64_64KEY; RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE); if RegDBKeyExist(sIISComponentReg) = 1 then if (RegDBGetKeyValueEx(sIISComponentReg, "BasicAuthentication", nRegType, sRegValue, nSize) = 0) then if sRegValue = "1" then bRequiredAuthenticationFound = TRUE; endif; elseif (RegDBGetKeyValueEx(sIISComponentReg, "WindowsAuthentication", nRegType, sRegValue, nSize) = 0) then if sRegValue = "1" then bRequiredAuthenticationFound = TRUE; endif; endif; endif; REGDB_OPTIONS = nCurrREGDB_OPTIONS; |
For C/C++ there are similar flags you can use for the RegOpenKeyEx function: http://msdn.microsof...129(VS.85).aspx