HKEY_CLASSES_ROOT, feem ntau luv luv li HKCR, yog lub tsev teev npe hauv Windows Registry thiab muaj cov ntaub ntawv txuas ntxiv cov ntaub ntawv, nrog rau cov ntaub ntawv teev npe programmatic (ProgID), Class ID (CLSID), thiab Interface ID (IID) cov ntaub ntawv.
Nyob rau hauv cov ntsiab lus yooj yim tshaj plaws, lub tsev teev npe no muaj cov ntaub ntawv tsim nyog rau Windows kom paub tias yuav ua li cas thaum koj hais kom nws ua ib yam dab tsi, nyiam saib cov ntsiab lus ntawm lub tsav, lossis qhib qee hom ntaub ntawv, etc.
Yuav Tau Li Cas Rau HKEY_CLASSES_ROOT
HKCR yog lub tsev teev npe, yog li nws zaum ntawm qib siab hauv Registry Editor, hauv paus ntawm tag nrho Windows Registry:
-
Open Registry Editor.
Txoj kev yooj yim tshaj plaws los ua qhov no hauv txhua lub versions ntawm Windows yog qhib lub Khiav dialog box ntawm WIN+R, thiab nkag mus regedit.
-
Nrhiav HKEY_CLASSES_ROOT nyob rau sab laug ntawm Registry Editor.
Koj yuav tsis pom tam sim ntawd yog tias koj tau siv cov npe tsis ntev los no thiab tso ntau qhov khaus khaus lossis cov yuam sij qhib. Ntaus Home ntawm koj cov keyboard kom pom HKCR teev nyob rau sab saum toj ntawm sab laug pane.
- ob-nias lossis ob npaug-kais HKEY_CLASSES_ROOT txhawm rau nthuav lub Hive, lossis siv tus xub me rau sab laug
Kho qhov sau npe muaj kev nyab xeeb tag nrho yog tias koj paub tias koj tab tom ua dab tsi, tab sis kev tsis saib xyuas tuaj yeem ua rau muaj teeb meem loj. Kawm yuav ua li cas ntxiv, hloov, thiab tshem tawm cov ntawv sau npe thiab cov txiaj ntsig rau kev taw qhia.
Registry Subkeys hauv HKEY_CLASSES_ROOT
Daim ntawv teev npe cov yuam sij hauv qab no yog qhov ntev heev thiab tsis meej pem. Peb yuav tsis piav txog txhua txhiab tus yuam sij koj yuav pom, tab sis peb tuaj yeem tsoo nws mus rau hauv qee qhov kev tswj hwm, uas yuav cia siab tias yuav qhia meej txog qhov no ntawm cov npe me ntsis.
Ntawm no yog qee qhov ntawm ntau cov ntaub ntawv txuas ntxiv cov yuam sij koj yuav pom hauv qab HKCR Hive, feem ntau yuav pib nrog lub sijhawm:
- HKEY_CLASSES_ROOT\.avi
- HKEY_CLASSES_ROOT\.bmp
- HKEY_CLASSES_ROOT\.exe
- HKEY_CLASSES_ROOT\.html
- HKEY_CLASSES_ROOT\.pdf
- HKEY_CLASSES_ROOT\AudioCD
- HKEY_CLASSES_ROOT\dllfile
- …
Txhua tus yuam sij sau npe no khaws cov ntaub ntawv ntawm qhov Windows yuav tsum ua li cas thaum koj nias ob zaug lossis ob zaug coj mus rhaub cov ntaub ntawv nrog qhov txuas ntxiv hauv File Explorer. Nws yuav suav nrog cov npe ntawm cov kev pab cuam pom nyob rau hauv seem "Qhib nrog …" thaum right-clicking/tapping a file, thiab txoj hauv kev rau txhua daim ntawv thov.
Piv txwv li, hauv koj lub computer, thaum koj qhib cov ntaub ntawv los ntawm lub npe ntawm draft.rtf, WordPad yuav qhib cov ntaub ntawv. Cov ntaub ntawv sau npe uas ua rau qhov tshwm sim yog khaws cia hauv HKEY_CLASSES_ROOT\.rtf tus yuam sij, uas txhais tau hais tias WordPad yog qhov program uas yuav tsum qhib cov ntaub ntawv RTF.
Vim qhov nyuaj ntawm yuav ua li cas HKEY_CLASSES_ROOT yuam sij raug teeb tsa, peb kiag li tsis pom zoo kom koj hloov pauv cov ntaub ntawv keeb kwm los ntawm kev sau npe. Hloov chaw, saib Yuav Ua Li Cas Hloov Cov Ntaub Ntawv Koom Tes hauv Windows rau cov lus qhia ntawm kev ua qhov no los ntawm hauv koj lub Windows ib txwm siv.
HKCR & CLSID, ProgID, & IID
Cov tseem tshuav hauv HKEY_CLASSES_ROOT yog ProgID, CLSID, thiab IID cov yuam sij. Nov yog qee qhov piv txwv ntawm txhua tus:
ProgID yuam sij nyob rau hauv lub hauv paus ntawm HKCR, nrog rau cov ntaub ntawv txuas ntxiv cov koom haum tau tham saum toj no:
- HKEY_CLASSES_ROOT\FaxServer. FaxServer
- HKEY_CLASSES_ROOT\JPEGFilter. CoJPEGFilter
- HKEY_CLASSES_ROOT\WindowsMail. Envelope
- …
Txhua tus yuam sij CLSID nyob hauv qab CLSID subkey:
- HKEY_CLASSES_ROOT\CLSID\{00000106-0000-0010-8000-00AA006D2EA4}
- HKEY_CLASSES_ROOT\CLSID\{06C792F8-6212-4F39-BF70-E8C0AC965C23}
- HKEY_CLASSES_ROOT\CLSID\{FA10746C-9B63-4b6c-BC49-FC300EA5F256}
- …
Txhua tus yuam sij IID nyob hauv qab Interface subkey:
- HKEY_CLASSES_ROOT\Interface\{0000000d-0000-0000-C000-00000000046}
- HKEY_CLASSES_ROOT\Interface\{00000089-0000-0010-8000-00AA006D2EA4}
- HKEY_CLASSES_ROOT\Interface\{00000129-0000-0000-C000-00000000046}
- …
Dab tsi ProgID, CLSID, thiab IID yuam sij yog rau muaj feem cuam tshuam rau qee qhov kev ua haujlwm ntawm lub khoos phis tawj programming thiab dhau ntawm qhov kev sib tham no. Txawm li cas los xij, koj tuaj yeem nyeem ntxiv txog tag nrho peb los ntawm kev ua raws cov kev txuas mus rau Microsoft lub vev xaib.
Txuag HKEY_CLASSES_ROOT Hive
Yog tsis muaj kev zam, koj yuav tsum nco ntsoov ua rov qab ntawm cov npe nkag koj npaj kho lossis tshem tawm. Saib Yuav Ua Li Cas Rov Qab Windows Registry yog tias koj xav tau kev pab thaub qab HKEY_CLASSES_ROOT, lossis lwm qhov chaw hauv lub npe, mus rau REG cov ntaub ntawv.
Yog tias muaj qee yam yuam kev, koj tuaj yeem rov qab Windows Registry mus rau lub xeev ua haujlwm nrog cov thaub qab. Txhua yam koj yuav tsum tau ua yog qhib cov ntaub ntawv REG thiab paub meej tias koj xav hloov pauv.
Ntau ntawm HKEY_CLASSES_ROOT
Thaum koj tuaj yeem hloov kho thiab tshem tawm tag nrho cov subkey hauv HKCR Hive, lub hauv paus nplaub tshev nws tus kheej, zoo li txhua qhov khaus hauv cov npe, tsis tuaj yeem hloov npe lossis tshem tawm.
HKEY_CLASSES_ROOT yog lub ntiaj teb Hive, uas txhais tau tias nws tuaj yeem muaj cov ntaub ntawv siv tau rau txhua tus neeg siv ntawm lub computer thiab pom tau los ntawm txhua tus neeg siv. Qhov no yog qhov sib piv rau qee qhov khaus khaus uas muaj cov ntaub ntawv tsuas yog siv rau cov neeg siv tam sim no tau kos npe.
Txawm li cas los xij, vim tias HKCR Hive yog qhov sib xyaw ua ke cov ntaub ntawv pom nyob rau hauv ob qho tib si HKEY_LOCAL_MACHINE Hive (HKEY_LOCAL_MACHINE\Software\Classes) thiab HKEY_CURRENT_USER Hive (HKEY_CURRENT_USER\Software\Classes), nws kuj muaj cov ntaub ntawv siv zoo li.peci Txawm li cas los xij, HKEY_CLASSES_ROOT tseem tuaj yeem tshawb xyuas los ntawm txhua tus neeg siv.
Qhov no txhais tau tias, tau kawg, tias thaum tus yuam sij sau npe tshiab tau tsim nyob rau hauv HKCR Hive, tib tus yuav tshwm sim hauv HKEY_LOCAL_MACHINE\Software\Classes, thiab thaum ib qho raug tshem tawm los ntawm ib qho, tib tus yuam sij raug tshem tawm ntawm lwm qhov chaw.
Yog tias tus yuam sij sau npe nyob hauv ob qhov chaw tab sis tsis sib haum xeeb hauv qee txoj kev, cov ntaub ntawv pom nyob rau hauv tus neeg siv kos npe rau lub Hive, HKEY_CURRENT_USER\Software\Classes, yuav tsum muaj qhov tseem ceeb thiab siv hauv HKEY_CLASSES_ROOT.