WINDOWS REGISTRY
1. Gii thiu v Registry: Registry là mt cơ s d liu dùng để lưu tr thông s k thut ca Windows. Nó ghi nhn tt c các thông tin khi
bn thay đổi, chnh sa trong Menu Settings, Control Panel....
2. Registry để đâu:
Trong Win95 & 98, Registry được ghi trong 2 file: user.dat và system.dat trong thư mc Windows. Trong Windows Me, Registry được lưu
trong file Classes.dat trong thư mc Windows. Trong Win2K Registry được lưu trong thư mc "Windows\System32\Config".
3 Registry có th chnh sa được không?
Registry có th chnh sa trc tiếp, làm thay đổi các thông s thông qua trình chnh sa Registry Editor. Chy Registry Editor bng cách gõ
regedit vào ca s Run.
4 Cu trúc ca Registry: Registry có cu trúc cây, ging cu trúc thư mc. Thông thường có sáu nhánh chính. Mi nhánh được giao him v
lưu gi nhng thông tin riêng bit. Trong các nhánh chính có rt nhiu nhánh con. Nhng nhánh con này cũng được lưu gi nhưng thông tin
riêng bit.
HKEY_CLASSES_ROOT: Lưu nhng thông tin dùng chung cho toàn b h thng.
HKEY_CURRENT_USER: Lưu nhng thông tin cho người dùng đang Logon
HKEY_LOCAL_MACHINE: Lưu nhng thông tin v h thng, phn cng, phn mm.
HKEY_USERS: Lưu nhng thông tin ca tt c các User, mi user là mt nhánh vi tên là s ID ca user đó
HKEY_CURRENT_CONFIG: Lưu thông tin v phn cng hin ti đang dùng.
HKEY_DYN_DATA: Đây cũng là mt phn ca nhánh HKEY_LOCAL_MACHINE
5. Các kiu d liu dùng trong Registry:
-REG_BINARY: Kiu nh phân
-REG_DWORD: Kiu Double Word
-REG_EXPAND_SZ: Kiu chui m rng đặc bit. VD: "%SystemRoot%"
-REG_MULTI_SZ: Kiu chui đặc bit
-REG_SZ: Kiu chui chun
6 Ti sao cn phi biết v Registry? - Registry lưu tt c các thông tin v phn cng, phn mm, nhng la chn ca người dùng....kim
soát được ni dung ca Registry là yêu cu tt yếu để bn s dng PC mt cách khoa hc, hiu sâu hơn v môi trường làm vịệc ca Windows.
- Mun tiến xa hơn trong k thut lp trình trên nn Windows, cách bo mt, cracking, hacking bn cn phi có hiu biết nht định v
Registry.
- Hu hết các th thut trong Windows mà các tp chí tin hc tên tui ca Vit Nam đã và s đăng có liên quan mt thiết đến Windows
Registry.
7 Cnh báo! Khi s dng Registry Editor bn phi tiến hành sao lưu Registry. Mi thay đổi có th làm máy ca bn không khi động, treo
máy, ..... . Sao lưu bng cách chy Registry Editor : File - Export ...... và lưu vào ch an toàn.
Nếu chưa có kiến thc v Windows Registry xin bn đọc mt chút các dòng hướng dn bên dưới.
- Dòng sau các t: User Key, Sytem Key, hoc Key cho biết đường dn đến nhánh cn sa cha hoc to mi nếu nó không tn ti.
Lưu ý: User Key: là để thay đổi đó có tác dng vi người đang Logon. System Key: là để thay đổi đó có tác dng vi tt c người dùng.
-Dòng Name là tên ca khoá cn to, nó là nhánh con bên ca s bên phi ca Registry
-Dòng Type là kiu d liu ca khoá mi to
-Dòng : Value là giá tr ca khoá
ACTIVE DESKTOP
Cho phép chế độ Desktop hot động hay không:
User Key: HKEY_CURRENT_USER\ Software\ Microsoft\ Windows\ CurrentVersion\ Policies\ Explorer
System Key: HKEY_LOCAL_MACHINE\ Software\ Microsoft\ Windows\ CurrentVersion\ Policies\ Explorer
Name: ForceActiveDesktopOn
Type: REG_DWORD (DWORD Value)
Value: (0 = default, 1 = enabled)
Mt s ngăn cn khi cho phép chế độ Desktop hot động.
NoChangingWallpaper - Không cho phép thay đổi hình Wallpaper.
NoComponents - Không cho phép hin th các thành phn.
NoAddingComponents - Không cho phép thêm các thành phn mi.
NoDeletingComponents - Không cho phép xoá các thành phn.
NoEditingComponents - Không cho phép sa các thành phn.
NoCloseDragDropBands - Không cho phép chc năng dùng chut kéo th trên Desktop.
NoMovingBands - Không cho phép chc năng kéo th các Taskbar đi nơi khác trên Desktop.
NoHTMLWallPaper - Ch cho phép hình dng bitmaps (BMP).
User Key:HKEY_CURRENT_USER\ Software\ Microsoft\ Windows\ CurrentVersion\ Policies\ ActiveDesktop.
System Key: HKEY_LOCAL_MACHINE\ Software\ Microsoft\ Windows\ CurrentVersion\ Policies\ ActiveDesktop.
Type: REG_DWORD (DWORD Value)
Value: (0 = disable restriction, 1 = enable restriction)
n chc năng Active Desktop t Menu Settings trên Start Menu. User Key: HKEY_CURRENT_USER\ Software\ Microsoft\ Windows\
CurrentVersion\ Policies\ Explorer.
System Key: HKEY_LOCAL_MACHINE\ Software\ Microsoft\ Windows\ CurrentVersion\ Policies\ Explorer.
Name: NoSetActiveDesktop
Type: REG_DWORD (DWORD Value)
Value: (0 = disable restriction, 1 = enable restriction)
Không cho thay đổi chế độ Active Destop.
User Key: HKEY_CURRENT_USER\ Software\ Microsoft\ Windows\ CurrentVersion\ Policies\ Explorer
System Key: HKEY_LOCAL_MACHINE\ Software\ Microsoft\ Windows\ CurrentVersion\ Policies\ Explorer
Name: NoActiveDesktopChanges
Type: REG_DWORD (DWORD Value)
Value: (0 = disable restriction, 1 = enable restriction)
CONTROL PANEL
Không cho phép thay đổi kiu dáng ca các Controls.
Phn này s hn chế mt phn hoc tt c các chc năng trong mc (Tab) Appearance trong Display. Gán giá tr 0: để hin, 1 để n vi các
tên khoá đưa ra phía bên dưới.
NoVisualStyleChoice - không cho phép thay đổi kiu dáng ca các ca s và út nhn.
NoColorChoice - Không cho phép thay đổi sơ đồ màu.
NoSizeChoice - Không cho phép thay đổi c ch.
User Key: HKEY_CURRENT_USER\ Software\ Microsoft\ Windows\ CurrentVersion\ Policies\ System.
Name: NoColorChoice, NoSizeChoice, NoVisualStyleChoice, SetVisualStyle.
Tt chế độ Themes Settings trong Display trong Control Panel:
Themes Settings để thay đổi kiu dáng ca các ca s các nút nhn. Nếu không thích sài thì ct chúng đi bng cách to mt khoá mi vi tên
'NoThemesTab' và gán giá tr cho nó là 1.
User Key: HKEY_CURRENT_USER\ Software\ Microsoft\ Windows\ CurrentVersion\ Policies\ Explorer.
System Key: HKEY_LOCAL_MACHINE\ Software\ Microsoft\ Windows\ CurrentVersion\ Policies\ Explorer.
Name: NoThemesTab
Type: REG_DWORD (DWORD Value)
Value: (0 = default, 1 = enable restriction)
Tt chế độ thay đổi Keyboard Navigation Settings trong Control Panel:
User Key: HKEY_CURRENT_USER\ Software\ Microsoft\ Windows\ CurrentVersion\ Policies\ Explorer.
System Key: HKEY_LOCAL_MACHINE\ Software\ Microsoft\ Windows\ CurrentVersion\ Policies\ Explorer.
Name: NoChangeKeyboardNavigationIndicators
Type: REG_DWORD (DWORD Value)
Value: (0 = default, 1 = enable restriction)
Ngăn cn tính năng trình din hot hình Animation Settings.
User Key: HKEY_CURRENT_USER\ Software\ Microsoft\ Windows\ CurrentVersion\ Policies\ Explorer.
System Key: HKEY_LOCAL_MACHINE\ Software\ Microsoft\ Windows\ CurrentVersion\ Policies\ Explorer.
Name: NoChangeAnimation
Type: REG_DWORD (DWORD Value)
Value: (0 = default, 1 = enable restriction)
Điu khin chế độ hot hình : User Key: HKEY_CURRENT_USER\ Control Panel\ Desktop\ WindowMetrics
Name: MinAnimate
Type: REG_SZ (String Value)
Value: (0=disable, 1=enable)
Tt Settings ca Display trong Control Panel:
Điu này cũng có nghĩa là bn không th thay đổi được độ phân gin ca màn hình mc Settings không được phép hot động.
User Key: HKEY_CURRENT_USER\ Software\ Microsoft\ Windows\ CurrentVersion\ Policies\ System.
System Key: HKEY_LOCAL_MACHINE\ Software\ Microsoft\ Windows\ CurrentVersion\ Policies\ System.
Name: NoDispSettingsPage
Type: REG_DWORD (DWORD Value)
Value: (0 = disabled, 1 = enabled)
Tt mc ScreenSaver ca Display trong Control Panel:
Khi tt mc ScreenSaver không có nghĩa là tt chế độ ScreenSaver t chy, mà n không cho thay đổi, chnh sa ScreenSaver. Vì vy trước
khi tt nó đi bn phi cân nhc.
User Key: HKEY_CURRENT_USER\ Software\ Microsoft\ Windows\ CurrentVersion\ Policies\ System.
System Key: HKEY_LOCAL_MACHINE\ Software\ Microsoft\ Windows\ CurrentVersion\ Policies\ System.
Name: NoDispScrSavPage
Type: REG_DWORD (DWORD Value)
Value: (0 = disabled, 1 = enabled)
Tt mc thay đổi hình nn ca Display trong Control Panel:
Không cho thay đổi hình nn, màu nn ca Desktop.
User Key: HKEY_CURRENT_USER\ Software\ Microsoft\ Windows\ CurrentVersion\ Policies\ System.
System Key: HKEY_LOCAL_MACHINE\ Software\ Microsoft\ Windows\ CurrentVersion\ Policies\ System.
Name: NoDispBackgroundPage
Type: REG_DWORD (DWORD Value)
Value: (0 = disabled, 1 = enabled)
Tt mc Appearance ca Display trong Control Panel.User Key: HKEY_CURRENT_USER\ Software\ Microsoft\ Windows\
CurrentVersion\ Policies\ System.
System Key: HKEY_LOCAL_MACHINE\ Software\ Microsoft\ Windows\ CurrentVersion\ Policies\ System.
Name: NoDispAppearancePage
Type: REG_DWORD (DWORD Value)
Value: (0 = disabled, 1 = enabled)
DISK DRIVES
Thay đổi thông s cnh báo s % không gian đĩa cng còn trng (Windows XP).
Giá tr mc định là 10%.Key: HKEY_LOCAL_MACHINE\ System\ CurrentControlSet\ Services\ LanmanServer\ Parameters
Name: DiskSpaceThreshold.
Type: REG_DWORD (DWORD Value)
Value: 0 - 99 percent (Default is 10)
Điu khin thông s hn chế không gian cho Master File Table.
Giá tr mc định là 1.Key: HKEY_LOCAL_MACHINE\ System\ CurrentControlSet\ Control\ FileSystem
Name: NtfsMftZoneReservation
Type: REG_DWORD (DWORD Value)
Value: 1 (default) - 4 (maximum)
Tt chế độ ghi đĩa CD trc tiếp t Window Explorer (Windows Xp)
Trong Windows XP cho phép bn ghi mt đĩa CD d dàng bng cách kéo nhng tp tin hoc thư mc ri th vào biu tượng đĩa CDR. Bn có
th tt chế độ này đi.
User Key: HKEY_CURRENT_USER\ Software\ Microsoft\ Windows\ CurrentVersion\ Policies\ Explorer
System Key: HKEY_LOCAL_MACHINE\ Software\ Microsoft\ Windows\ CurrentVersion\ Policies\ Explorer
Name: NoCDBurning
Type: REG_DWORD (DWORD Value)
Value: (0 = Allow CDR, 1 = Disable CDR)
Thay đổi tên và biu tượng ca đĩa.
Key: HKEY_LOCAL_MACHINE\ SOFTWARE\ Microsoft\ Windows\ CurrentVersion\ Explorer\ DriveIcons
Name: Default
Type: REG_SZ (String Value)
Ch định chương trình chơi đĩa CD Audio.
Mc định khi bn đưa đĩa Cd Audio vào đĩa thì CD Player ca Microsoft s m đĩa lên. Nhưng nếu có chương trình khác hay hơi bn có th
ch định cho chương trình đó thay thế.
Key: HKEY_CLASSES_ROOT\ AudioCD\ Shell\ Play\ Command
Name: (Default)
Type: REG_SZ (String Value)
Value: Command-line to Execute - nhp vào đường dn ca chương trình chơi đĩa bn mun.
Đin khin chế độ t động m đĩa CD khi đưa đĩa vào .
Key: HKEY_LOCAL_MACHINE\ SYSTEM\ CurrentControlSet\ Services\ CDRom.
Name: Autorun
Type: REG_DWORD (DWORD Value)
Value: (0=disable, 1=enable)
EXPLORER
n mc Distributed File System trong Windows Explorer
User Key: HKEY_CURRENT_USER\ Software\ Microsoft\ Windows\ CurrentVersion\ Policies\ Explorer.
Name: NoDFSTab
Type: REG_DWORD (DWORD Value)
Value: (0 = default, 1 = enable restriction)
n mc Security
User Key: HKEY_CURRENT_USER\ Software\ Microsoft\ Windows\ CurrentVersion\ Policies\ Explorer.
Name: NoSecurityTab
Type: REG_DWORD (DWORD Value)
Value: (0 = default, 1 = enable restriction)
n mc Hardware User Key: HKEY_CURRENT_USER\ Software\ Microsoft\ Windows\ CurrentVersion\ Policies\ Explorer.
Name: NoHardwareTab
Type: REG_DWORD (DWORD Value)
Value: (0 = default, 1 = enable restriction)
Tt Menu New.
Tìm đến khoá sau và thêm cho nó du '-' sau du '{' :
System Key: HKEY_CLASSES_ROOT\ CLSID\ {D969A300-E7FF-11d0-A93B-00A0C90F2719}
INTERNET EXPLORER
n mt s nút trên thanh ToolBar ca Internet Explorer.
Cn to mt khoá vi tên là 'SpecifyDefaultButtons' và gán giá tr cho nó là 1 để thc hin cêế độ n mt s nút trong danh sách lit kê bên
dơới, bước kế tiếp mun n mt nút bt k trong danh sách bên dưới thì bn cn to mt khoá mi vi tên nút đó và gán cho nó giá tr là 2.
- Btn_Back
- Btn_Forward
- Btn_Stop
- Btn_Refresh
- Btn_Home
- Btn_Search
- Btn_Favorites
- Btn_Folders
- Btn_Media
- Btn_History
- Btn_Fullscreen
- Btn_Tools
- Btn_MailNews
- Btn_Size
- Btn_Print
- Btn_Edit
- Btn_Discussions
- Btn_Cut
- Btn_Copy
- Btn_Paste
- Btn_Encoding
- Btn_PrintPreview
User Key: HKEY_CURRENT_USER\ Software\ Microsoft\ Windows\ CurrentVersion\ Policies\
Explorer
System Key: HKEY_LOCAL_MACHINE\ Software\ Microsoft\ Windows\ CurrentVersion\ Policies\
Explorer
Name: SpecifyDefaultButtons
Type: REG_DWORD (DWORD Value).
Không cho phép thay đổi (Customize) trên Toolbar ca Internet Explorer.
User Key: HKEY_CURRENT_USER\ Software\ Microsoft\ Windows\ CurrentVersion\ Policies\
Explorer
System Key: HKEY_LOCAL_MACHINE\ Software\ Microsoft\ Windows\ CurrentVersion\ Policies\
Explorer
Name: NoToolbarCustomize
Type: REG_DWORD (DWORD Value)
Value: (1 = enable restriction)
Không cho hin nút Option trong Menu Tool ca Internet Explorer:User Key: HKEY_CURRENT_USER\ Software\ Microsoft\ Windows\
CurrentVersion\ Policies\
Explorer
System Key: HKEY_LOCAL_MACHINE\ Software\ Microsoft\ Windows\ CurrentVersion\ Policies\
Explorer
Name: NoBandCustomize
Type: REG_DWORD (DWORD Value)
Value: (1 = enable restriction)
Không cho hin mt s nút trên Menu Help:
NoHelpMenu - Disable the entire help menu
NoHelpItemNetscapeHelp - Remove the "For Netscape Users" menu item
NoHelpItemSendFeedback - Remove the "Send Feedback" menu item
NoHelpItemTipOfTheDay - Remove the "Tip of the Day" menu item
NoHelpItemTutorial - Remove the "Tour" (Tutorial) menu item
User Key: HKEY_CURRENT_USER\ Software\ Policies\ Microsoft\ Internet Explorer\
Restrictions
System Key: HKEY_LOCAL_MACHINE\ Software\ Policies\ Microsoft\ Internet Explorer\
Restrictions
Type: REG_DWORD (DWORD Value)
Value: (0 = restriction disabled, 1 = restriction enabled)
Không cho phép ti file t Internet v:
User Key: HKEY_CURRENT_USER\ Software\ Microsoft\ Windows\ CurrentVersion\
Internet Settings\ Zones\ 3
System Key: HKEY_LOCAL_MACHINE\ Software\ Microsoft\ Windows\ CurrentVersion\
Internet Settings\ Zones\ 3
Name: 1803
Type: REG_DWORD (DWORD Value)
Value: (0 = downloads enabled, 3 = downloads disabled)
Không cho phép truy file t mt đường dn Internet.
User Key: HKEY_CURRENT_USER\ Software\ Microsoft\ Windows\ CurrentVersion\ Policies\
Explorer
System Key: HKEY_LOCAL_MACHINE\ Software\ Microsoft\ Windows\ CurrentVersion\ Policies\
Explorer
Name: NoFileUrl
Type: REG_DWORD (DWORD Value)
Value: (0 = Enable File URLs, 1 = Disable)
n mt s nút trong Internet Explorer: