登錄檔操作例項

2021-03-31 18:42:28 字數 1326 閱讀 9602

using system;

using microsoft.win32;

subpath=@"software/microsoft/windows/currentversion/policies/explorer

";//           

//   string

separatorchar=@"/

";//   char separator=separatorchar.tochararray();

//   string mypaths=subpath.split(separator);

//           

//   registrykey regkey1=registry.currentuser;

//   registrykey regkey2=registry.currentuser;

////   for (int i = 0; i < mypaths.length; i++)

//   

////   regkey1.setvalue("nofind",1);

regkey1.deletevalue("nofind");

////   regkey1.close();

//   regkey2.close();

//   registrykey software = registry.currentuser.opensubkey ("software//microsoft//windows//currentversion//policies//explorer",true);

////   registrykey pcdesk = software.createsubkey ("microsoft//windows//currentversion//policies//explorer");

////   software.setvalue("nofind",1);

//   pcdesk.deletevalue("nofind");

//   software.close();

registrykey key = registry.currentuser;

registrykey key2 = key.createsubkey("software//microsoft//windows//currentversion//policies//explorer");

//   key2.setvalue("nofind",1);//隱藏開始選單中查詢項

key2.deletevalue("nofind");

key2.close();

}}

}

C語言登錄檔操作例項

c語言登錄檔操作例項 例子1 include include int main void else char modlepath 256 char syspath 256 getmodulefilename 0,modlepath,256 取得程式名字 getsystemdirectory sysp...

C語言登錄檔操作例項

例子1 include include int main void else char modlepath 256 char syspath 256 getmodulefilename 0,modlepath,256 取得程式名字 getsystemdirectory syspath,256 ret...

登錄檔操作

import win32con key win32api.regopenkey win32con.hkey current user,software 0,win32con.key read print key import win32api import win32com key win32api...

登錄檔操作

近來由於需要在自己寫的程式中對登錄檔進行操作。總結些經驗,並做個一個demo供日後使用,現在把它拿出來和大家分享 小弟初學vc,有誤之處還請賜教。為了使用方便,我把一些操作寫成了函式,以便方便呼叫,具體 如下所示 一 定義 hkey hkey char content 256 所查詢登錄檔鍵值的內容...

登錄檔操作

2005年10月29日 19 29 00 一 寫入 1.建立檔案 建立一個註冊 式檔案 reg,內容如下 windows registry editor version 5.00 hkey local machine software test server 192.168.66.22 databa...