Auto-generate Flow Chart from Java/C++ Codes:

Raptor Flowchart Tutorial For Beginners

Thursday, July 30, 2009

Bagaimana menggunakan Windows Registry

Pengenalan

Semenjak Windows 95, Sistem Pengendalian Windows menggunakan pangkalan data hirarki untuk menyimpan maklumat system setting, hardware configurations dan user preferences. Pangkalan Data ini dinamakan Windows Registry ataupun biasanya dipanggil Registry. Apabila ada hardware baru yang dipasang pada komputer, apabila pengguna menukar pilihan latarbelakang desktop, ataupun apabila pengguna install software yang baru, maklumat berkenaannya disimpan di dalam Registry. Maklumat ini kemudiannya menjadi rujukan Windows. Pendedahan tentang Registry akan memberikan pengetahuan dan peluang kepada pengguna untuk menguruskan sendiri Windows dengan lebih cekap namun kesilapan mengubahsuai Registry boleh mendatangkan masalah yang besar ke atas Windows.

Struktur

Struktur Registry berbentuk hirarki, sama seperti struktur direktori fail dalam komputer. Terdapat Main Key, atau Hive, bersama Keys, Subkeys dan Values.

Hives - Hives adalah bahagian tertinggi dalam hirarki. Bergantung pada versi Windows yang digunakan, kebiasaannya terdapat 5 atau 6 hives seperti berikut:

HKEY_CURRENT_USER (HKCU) -
This Hive contains the preferences and configuration for the particular user who is currently logged in. If a different user is logged onto the same machine, then the information in this Hive would change corresponding to that particular user's configuration.
HKEY_LOCAL_MACHINE (HKLM) -
This Hive contains the configuration for the actual computer. The information in this Hive remains the same regardless of the user currently logged on.
HKEY_CLASSES_ROOT (HKCR) -
This Hive contains the information for that pertains to the core user interface such as file associations and shortcuts.
HKEY_USERS (HKU) -
This Hive contains the user information for all the users that have ever logged onto this computer.
HKEY_CURRENT_CONFIG (HKCC) -
This Hive contains the information about current hardware configuration. This Hive is linked to the HKLM Hive.
HKEY_DYN_DATA (HKDD) -
This Hive is found only on Windows 95/98/ME. It contains information about hardware Plug and Play. This Hive is linked to the HKLM Hive.

Keys - Keys adalah seperti folders yang mana ia boleh mengandungi Subkeys atau Values.

Values - Data yang tersimpan di dalam Key atau SubKey. Biasanya ia terdiri dalam bentuk format binary, strings atau DWORD.

Contoh Registry key adalah seperti berikut:
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\\Start Page

When we break this Key down to its components we can see the following:

HKEY_CURRENT_USER is the Hive that this key is associated with.
Software is a Key
Microsoft - This is a Subkey
Internet Explorer - This is a Subkey
Main - This is a Subkey
Start Page - This is the Value that the actual data is stored in. For this particular Value, the data will be the start page that you want Internet Explorer to use.

Menyunting Registry

Untuk mengubah Values di dalam Registry, anda memerlukan program sunting seperti Registry Editor (ataupun panggilan Regedit). Windows mempunyai program regedit.exe yang memainkan peranan ini. Untuk membuka program ini, Klik Start/Run dan taipkan "regedit". 

Apabila Program Registry Editor dilancarkan, ia akan memaparkan dua panel. Panel kiri adalah untuk navigasi. Tanda "+" maksudnya ada lagi struktur data yang tersimpan dibawah sesuatu data. Klik "+" dan anda akan melihat data ini. Klik "-" untuk meringkaskan semula pandangan struktur data tersebut.

Screenshot di bawah memaparkan Registry Editor khususnya untuk nilai
HKEY_CURRENT_USER\Control Panel\Colors

Registry Editor






No comments: