Failed to Install WSUS on X64 IIS 6 with COMException 0x80020006

Customer want install WSUS on X64 IIS 6 and got follow error when the setup application tried to create a virtual directory. Here is the error log:

2010-08-05 16:39:30 Error IISCustomAction Command /Install FailedSystem.Runtime.InteropServices.COMException (0x80020006): Unknown name. (Exception from HRESULT: 0x80020006 (DISP_E_UNKNOWNNAME))

2010-08-05 16:39:30 Error IISCustomAction at System.DirectoryServices.DirectoryEntry.Invoke(String methodName, Object[] args)

2010-08-05 16:39:30 Error IISCustomAction at Microsoft.UpdateServices.Setup.IisAdsiDriver.CreateVirtualDirectory(IisWebVirtualDir virtualDirectoryInfo)

2010-08-05 16:39:30 Error IISCustomAction at Microsoft.UpdateServices.Setup.IisWebVirtualDir.Create(IIisMetabaseDriver metabaseDriver)

2010-08-05 16:39:30 Error IISCustomAction at Microsoft.UpdateServices.Setup.IisConfig.ApplyConfigWebVirtualDirs(IIisMetabaseDriver metabaseDriver, IisConfig previousConfig)

2010-08-05 16:39:30 Error IISCustomAction at Microsoft.UpdateServices.Setup.IisConfig.ApplyConfig(IIisMetabaseDriver metabaseDriver, Boolean upgrading, Boolean& siteCreated)

2010-08-05 16:39:30 Error IISCustomAction at Microsoft.UpdateServices.Setup.IisCustomAction.Install(String installRevision, String configFilePath, String webSiteName, String newWebSiteBinding, String newWebSiteRootPath, String[] rootPaths)

2010-08-05 16:39:30 Error IISCustomAction at Microsoft.UpdateServices.Setup.MainClass.Install()

2010-08-05 16:39:30 Error IISCustomAction at Microsoft.UpdateServices.Setup.MainClass.PerformSetupAction()

The sample script from MSDN failed on customer side as well. Here is the script and error message.

' Create an instance of the virtual directory object that represents the default Web site.

Set IIsWebVDirRootObj = GetObject("IIS://localhost/W3SVC/1/Root")

' Use the Windows ADSI container object "Create" method to create a new virtual directory.

Set IIsWebVDirObj = IIsWebVDirRootObj.Create("IIsWebVirtualDir", "NewVDirCreatedByScriptForTesting")

' Use the Windows ADSI object "Put" method to set some required properties.

IIsWebVDirObj.Put "Path", "d:\tools"  

IIsWebVDirObj.Put "AccessRead", True

IIsWebVDirObj.Put "AccessScript", True

' Use the AppCreate2 method of the IIS ADSI provider to create an application on the new virtual directory.

IIsWebVDirObj.AppCreate2 1

IIsWebVDirObj.Put "AppFriendlyName", "NewApp"

' Use the Windows ADSI object "SetInfo" method to save the data to the metabase.

IIsWebVDirObj.SetInfo

Error Message:

Object doesn’t support this property or method: ‘IIsWebDirObj.AppCreate2.

Then, we tried to create the virtual directory manually for testing purpose; however, we failed to open the IIS MMC.

From the error message, this sounds some component was not registered well, so we decided to run Process Monitor. And found the problem should be due to system32\wamregps.dll

Inetinfo.exe(IIS Admin Service) tried to load wamregps.dll and it was found under system32 folder. However, inetinfo.exe ignored this file and kept to find this file under other folders. Based on this, we suspect this file was corrupted.

1:25:54.2262341 PM inetinfo.exe 5592 RegCloseKey HKCR\CLSID\{29822AB8-F302-11D0-9953-00C04FD919C1}\InprocServer32 SUCCESS

1:25:54.2262450 PM inetinfo.exe 5592 RegCloseKey HKCR\CLSID\{29822AB8-F302-11D0-9953-00C04FD919C1} SUCCESS

1:25:54.2264018 PM inetinfo.exe 5592 QueryOpen C:\WINDOWS\system32\inetsrv\WAMREGPS.DLL NAME NOT FOUND

1:25:54.2265167 PM inetinfo.exe 5592 QueryOpen C:\WINDOWS\system32\wamregps.dll SUCCESS CreationTime: 12/22/2009 12:55:46 PM, LastAccessTime: 8/9/2010 1:25:54 PM, LastWriteTime: 2/18/2007 8:00:00 PM, ChangeTime: 8/6/2010 9:16:02

……

1:25:54.2297887 PM inetinfo.exe 5592 QueryOpen C:\WINDOWS\WAMREGPS.DLL NAME NOT FOUND

1:25:54.2299309 PM inetinfo.exe 5592 QueryOpen C:\WINDOWS\system32\wbem\WAMREGPS.DLL NAME NOT FOUND

1:25:54.2300740 PM inetinfo.exe 5592 QueryOpen C:\WINDOWS\system32\windowspowershell\v1.0\WAMREGPS.DLL NAME NOT FOUND

1:25:54.2301873 PM inetinfo.exe 5592 QueryOpen C:\Program Files\HP\NCU\WAMREGPS.DLL NAME NOT FOUND

……..

1:25:54.2308425 PM inetinfo.exe 5592 QueryOpen C:\Program Files\System Center Operations Manager 2007\WAMREGPS.DLL NAME NOT FOUND

Then, we checked this file and found its size was incorrect. And then, we reviewed the IIS installation log(%windir%\iis6.log) and found follow information. This means this file was X86 version instead of the expected AMD64 version.

[Date Time] OC_COMPLETE_INSTALLATION:12/28/2007 9:37:11 A_______ 6.0.3790.0: 6.0.3790.0 (srv03_rtm.030324-2048): x86: C:\WINNT\system32\wamregps.dll

The correct one should looks like:

[Date Time] OC_COMPLETE_INSTALLATION:12/28/2007 9:37:11 A_______ 6.0.3790.0: 6.0.3790.0 (srv03_rtm.030324-2048): AMD64: C:\WINNT\system32\wamregps.dll

Resolution:

Re-install IIS with the correct installation media fixed the problem.

Regards,

Wei Zhao