注册表入门之作——逗你玩

注册表很庞大,很复杂,我们认识他就可以用下面的实验来体会。经过对下面注册表的修改,你将看到,启动(Windows)系统时弹出一个对话框,,必须点确定才能进入系统,不然,就在系统之外等着吧。
请看以下详细操作
展开 “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon”
接着在“Winlogon”文件夹里面编辑”-“新建”-“字符串值创建数值名称为“LegalNoticeCaption”(这是对话框名)和“LegalNoticeText” 这是对话框里的内容)的键值数据项(注意看准字母输入,打多打少一个字母将无效)设置数值数据的值,例如“LegalNoticeCaption”的数值数据设置为"我会发财"“LegalNoticeText”的数值数据设置为"我很想你".F5刷新,然后重新启动系统即可看到自己的上面的东东了。
 
我根据原理写成批处理文件。批处理JOKE.BAT——恶作剧开始;STOP JOKING.BAT——恶作剧结束。
把下面蓝色代码保存在一个记事本文件中,文件名后缀BAT不能少;保存类型——所有文件。
红色部分你可以改,比如改为你喜欢的一句格言等。
 
批处理JOKE.BAT
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v LegalNoticeCaption /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v LegalNoticeCaption /t REG_sz /d 你就是猪!
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v LegalNoticeText /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v LegalNoticeText /t REG_sz /d 我是猪吗?
 
 
STOP JOKING.BAT
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v LegalNoticeCaption /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v LegalNoticeCaption /t REG_sz /d
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v LegalNoticeText /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v LegalNoticeText /t REG_sz /d
 
下面就是运行后,你开机时会看到的。
这玩意技术性低,趣味性高,蛮好玩的,主要是让你体会注册表的威力,呵呵。