卸载后检查注册表
错误:需要绝对路径信息 ( Absolute path information is required )
[HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/InetStp]
"PathWWWRoot"="//inetpub//wwwRoot "
此处少了盘符,如“C:”
错误:language is not supported
[HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Shared Tools/Web Server Extensions/12.0/ServerLanguage]
"2052"=""
此处ServerLanguage被删,2052代表简体中文
影响路径的源代码:
Microsoft.SharePoint.Administration.SPAdministrationServiceUtilities
internal static string WWWRootPath { get { string wwwRootPath = m_wwwRootPath; if (string.IsNullOrEmpty(wwwRootPath)) { wwwRootPath = GetLocalMachineRegistryValue(@"SOFTWARE/Microsoft/INetStp", "PathWWWRoot"); if (string.IsNullOrEmpty(wwwRootPath)) { wwwRootPath = Environment.ExpandEnvironmentVariables("%SystemDrive%") + @"/Inetpub/wwwroot"; } m_wwwRootPath = wwwRootPath; } return wwwRootPath; } }
SharePoint 管理中心 Web 应用程序(SharePoint Central Administration Web Application)
的绝对路径存在表SharePoint_Config.Objects中,我用Profiler监视到的
--check
select cast(Properties as xml).value('(//sFld[@name="m_Path"])[1]','varchar(80)') from Objects where ClassId='4C0FA7BC-0812-4ED2-80AB-89D752898BC6'
错误安装时返回
/inetpub/wwwRoot/wss/VirtualDirectories/31228
即Microsoft.SharePoint.Administration.SPIisSettings.Path
不愿重装可尝试手动修改数据库和注册表,但可能还有未知的地方
这是我的
[HKEY_CURRENT_USER/Software/Microsoft/Search Assistant/ACMru/5604]
"000"="inetpub//wwwRoot//wss//VirtualDirectories"
--repair
declare @path varchar(80) select @path=cast(Properties as xml).value('(//sFld[@name="m_Path"])[1]','varchar(80)') from Objects where ClassId='4C0FA7BC-0812-4ED2-80AB-89D752898BC6' update Objects set Properties=replace(cast(Properties as varchar(max)),@path,'c:'+@path)--Your absolute path here where ClassId='4C0FA7BC-0812-4ED2-80AB-89D752898BC6'
对象确实是以xml的形式存在对象表里
FYI