日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Hive-Based Registry使用

發(fā)布時(shí)間:2023/12/10 编程问答 31 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Hive-Based Registry使用 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
對(duì)于Hive干什么用這里就不多介紹了,根據(jù)文檔的介紹,Hive形式的注冊(cè)表分為:Boot hive,System hv和User hive三種。Boot hive就是指那部分在Boot過程中需要使用到的注冊(cè)表信息,這部分是實(shí)在沒辦法放在System hive中了,所以就把它們單獨(dú)放在Boot hive中了。System hive是不用放在Boot中的和系統(tǒng)相關(guān)的注冊(cè)表信息,而User hive則是用戶相關(guān)的注冊(cè)表信息了。下面就看看這三個(gè)部分的具體內(nèi)容:

?1.Boot hive ,原文是這樣介紹的:

The boot hive contains system settings that are applied only during boot. The boot hive is read out of ROM and used to start drivers and file systems needed to reach the system hive file. Once the system hive is mounted, the boot hive is discarded. Changes made to the registry during the boot process are copied into the system hive once it is available. The boot hive in ROM remains unchanged.

從這段介紹中可以理解Boot中的信息是用來在后面獲得System hive而在Boot階段所必需包括的注冊(cè)表信息。因此Boot hive中的內(nèi)容只要能讓后面獲得System hive成為可能就可以了。

?2.System hive,原文如下:

The system hive contains system settings that do not pertain to any one user. The OEM selects the system hive file name and location. The system hive file is typically named System.hv, but the location can vary.

The registry value?SystemHive?under?HKEY_LOCAL_MACHINE\init\BootVars?indicates the path and file name of the system hive.

從中可以看出System和用戶無關(guān),由OEM來選擇System hive的文件名與位置,默認(rèn)的System hive會(huì)被命名為System.hv,但位置不固定。在HKEY_LOCAL_MACHINE\init\BootVars?鍵下的值SystemHive?指定System hive的名字和路徑。

?3.User hive,原文如下:

A user hive contains user-specific settings. All user hives are named User.hv and are located inside separate user directories. Each directory is given the name of the user to which it belongs.

The registry value?ProfileDir?under?HKEY_LOCAL_MACHINE\init\BootVars?indicates the location where all user directories are placed.

User hive包括了和用戶相關(guān)的注冊(cè)表信息。所有的User hive都是一樣的名字:User.hv。但是放在不同的用戶目錄下,例如有兩個(gè)用戶的目錄A,B,兩個(gè)目錄里的User hive都叫做User.hv。但是一個(gè)是A/User.hv。另一個(gè)是B/User.hv。同System hive類似,在HKEY_LOCAL_MACHINE\init\BootVars?下的ProfileDir?指定了所有用戶目錄存放的路徑。

?有了以上的信息,下面來看如何使能Hive Registry。

?1.在PB中把Hive-based Registry Catalog item加進(jìn)來。

?2.添加注冊(cè)表[HKEY_LOCAL_MACHINE\init\BootVars]下的內(nèi)容:
??? "SystemHive"="<your system hive location>"

??? "ProfileDir"="<your user hive location>"

??? "DefaultUser"="<username>"
??? "Flags"=dword:<your value>

?3.把在Boot階段所需要的注冊(cè)表信息封裝在所示的注釋中

? ?; HIVE BOOT SECTION
?? <your registry settings>
?? ; END HIVE BOOT SECTION
?4.在存放System hive的分區(qū),要做相應(yīng)的設(shè)置,在CE5.0之后的要設(shè)MountAsBootable = dword:1.對(duì)于早期的版本,則需要設(shè)置MountFlags =dword :2

分區(qū)路徑為[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\<MyProfile>\<MyFileSystem>]
?5.如果希望在每次修改后自動(dòng)保存,那么在[HKEY_LOCAL_MACHINE\init\BootVars]下設(shè)置???????????????????????????? "RegistryFlags"=dword:1

?以上都是根據(jù)PB的幫助文檔和別人的Blog獲得的信息,能不能使用起來我還沒有驗(yàn)證過。不過應(yīng)該差不多了,最后說一下自己的一點(diǎn)理解,也算一個(gè)例子吧。例如我們的系統(tǒng)使用BINFS和FATFS,System.hv存放在FAT上面,那么在Boot Hive中需要把BINFS和FATFS都使能起來,不然在后面的加載過程中得不到System.hv的話其他驅(qū)動(dòng)就沒法加載了。只有在Boot Hive中把BINFS和FATFS都使能起來,這樣才能在FAT分區(qū)中獲得System.hv這樣才能保證后面的驅(qū)動(dòng)正常的加載。

創(chuàng)作挑戰(zhàn)賽新人創(chuàng)作獎(jiǎng)勵(lì)來咯,堅(jiān)持創(chuàng)作打卡瓜分現(xiàn)金大獎(jiǎng)

總結(jié)

以上是生活随笔為你收集整理的Hive-Based Registry使用的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。