|
|
CBC中写注册表使程序开机自动运行的方法 |
|
|
作者:未知 来源:月光软件站 加入时间:2005-2-28 月光软件站 |
#include <Registry.hpp> TRegistry *Reg=new TRegistry(); try { Reg->RootKey=HKEY_LOCAL_MACHINE; Reg->OpenKey("\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\\",false); if(!Reg->ValueExists("wz")) { Reg->WriteString("wz",ExpandFileName(Application->ExeName)); } else { if(Reg->ReadString("wz")!=ExpandFileName(Application->ExeName)) { Reg->WriteString("wz",ExpandFileName(Application->ExeName)); } } } __finally { delete Reg; } 正文 
|
|
相关文章:相关软件: |
|