注册表脚本简单点玩:添加、删除键

go:http://hi.baidu.com/cupenoruler/item/ed93fa2669bc5d3794f62bbe

建个文本,首先第一行:
    Windows Registry Editor Version 5.00

    (version几就不管了,固定写 5.00 ,XP和win7都测试通过了)。

下面空一行再写(遵照注册表编辑导出的格式)
    项( 注意用中括号标识)

       [XX\OO\xx\oo]

       [-XX\OO\xx\oo]    //表示删除该项

    项的下一行就是对键的操作了,我暂时只有字符串键的例子,其他的也差不多。

       键名=键值

       键名=-                //表示删除该键
       
一个添加开机启动项的例子如下:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
"LanZhouShaoBing"="C:\\Windows\\System32\\ctfmon.exe"

另一个删除开机启动项的例子如下:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
"LanZhouShaoBing"=-


可以一次性添加多个键,也可以多给几个项添加键,
找实际例子来试太麻烦,这几个重复的字符能表达我的意思就成,如下:

Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run] "LanZhouShaoBing1" = "C:\\Windows\\System32\\ctfmon.exe" "LanZhouShaoBing2" = "C:\\Windows\\System32\\ctfmon.exe" "LanZhouShaoBing3" = "C:\\Windows\\System32\\ctfmon.exe" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run] "LanZhouShaoBing" = "C:\\Windows\\System32\\ctfmon.exe" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run] "LanZhouShaoBing" = "C:\\Windows\\System32\\ctfmon.exe"


OK~  文件名改为XXOO.reg, 双击之~ O了~
太简单了,我忍不住怀疑我写水段子会不会被BS~

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值