Added a function of read registry