随便看看,这部分微软抹去了符号。
产品类型的注册表在SystemControl->ProductSuite->ProductOptions
1.系统初始化时已经读取了这个值,详见ROS。
CmControlVector是一系列要在系统初始化前期从hive中读取来的值,其中就有
{
L"ProductOptions",
L"ProductSuite",
CmSuiteBuffer,
&CmSuiteBufferLength,
&CmSuiteBufferType
},
这个函数调用是
CmGetSystemControlValues(LoaderBlock->RegistryBase,CmControlVector);
2. ExInitSystemPhase0的时候会对CmSuiteBuffer进行判断
3.Nt启动时的ExInitSystemPhase2,就一个功能,就是调用ExpWatchProductTypeInitialization()
这个函数中初始化了一些需要保护的注册表信息
其中产品类型信息保存在了ProductSuiteKey和ExpProductTypeValueInfo中。
初始化了SharedUserData->SuiteMask
注册一个注册表修改通知
4.这个通知消息中
会尝试回写注册表,打不开注册表的话先报一个错误
尝试回会写注册表