批处理修改注册表权限来禁止修改IE主页!

作者:zqcheng    发布于8年前 (2010-05-13)    阅读:  202  次

批处理修改注册表权限来禁止修改IE主页!
有个别软件会改主页,哪怕你改回来了,它又会改回去,如果你是IE6的话,在组策略里禁止改主页也没用,用IE7就可以.我这两天就碰到了这样的软件.所以我在网上查了一下,发现可以通过修改注册权限来禁止.用到的命令就是XP自带的regini.exe!

首先把你的主页先设好,先给个改主页的注册表,里面的主页你们自己改.

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerMain]
“Start Page”=”http://www.hao123.com”
“First Home Page”=”http://www.hao123.com”

[HKEY_CLASSES_ROOTCLSID{871C5380-42A0-1069-A2EA-08002B30309D}shellOpenHomePageCommand]
@=hex(2):22,00,25,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,46,00,69,00,6c,
00,65,00,73,00,25,00,5c,00,49,00,6e,00,74,00,65,00,72,00,6e,00,65,00,74,00,
20,00,45,00,78,00,70,00,6c,00,6f,00,72,00,65,00,72,00,5c,00,69,00,65,00,78,
00,70,00,6c,00,6f,00,72,00,65,00,2e,00,65,00,78,00,65,00,22,00,20,00,68,00,
74,00,74,00,70,00,3a,00,2f,00,2f,00,77,00,77,00,77,00,2e,00,68,00,61,00,6f,
00,31,00,32,00,33,00,2e,00,63,00,6f,00,6d,00,00,00

然后随便建一个INI文件,名字任意我建的是regini.ini,位置任意.然后ini里的内容为:

HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerMain [2 8]
HKEY_CLASSES_ROOTCLSID{871C5380-42A0-1069-A2EA-08002B30309D}shellOpenHomePageCommand [2 8]

保存退出,在cmd里输入regini [drive:][path]<regini.ini>(就是你做的ini文件的位置.)回车,你现在在到注册表相应键值里去修改看看效果,会提示修改无效.[2 8]这个是什么意思呢,就是权限代码,2表示administrators组只有读取权限,8表示everyone只有读取权限.我在附上权限代码表.代码表也是网上找的,我在cmd下输入regini /?居然没有帮助出来…郁闷得很…

1 – Administrators 完全访问
2 – Administrators 读取访问
3 – Administrators 读取、写入访问
4 – Administrators 读取、写入、删除访问

5 – Creator 完全访问
6 – Creator 读取、写入访问

7 – everyone 完全访问
8 – everyone 读取访问
9 – everyone 读取、写入访问
10 – everyone 读取、写入、删除访问

11 – Power Users 完全访问
12 – Power Users 读取、写入访问
13 – Power Users 读取、写入、删除访问

14 – System Operators 完全访问
15 – System Operators 读取、写入访问
16 – System Operators 读取、写入、删除访问

17 – System 完全访问
18 – System 读取、写入访问
19 – System 读取访问

20 – Administrators 读取、写入、执行访问

21 – Interactive User 完全访问
22 – Interactive User 读取、写入访问
23 – Interactive User 读取、写入、删除访问

补充一下,

[HKEY_CLASSES_ROOTCLSID{871C5380-42A0-1069-A2EA-08002B30309D}shellOpenHomePageCommand]
@=hex(2):22,00,25,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,46,00,69,00,6c,
00,65,00,73,00,25,00,5c,00,49,00,6e,00,74,00,65,00,72,00,6e,00,65,00,74,00,
20,00,45,00,78,00,70,00,6c,00,6f,00,72,00,65,00,72,00,5c,00,69,00,65,00,78,
00,70,00,6c,00,6f,00,72,00,65,00,2e,00,65,00,78,00,65,00,22,00,20,00,68,00,
74,00,74,00,70,00,3a,00,2f,00,2f,00,77,00,77,00,77,00,2e,00,68,00,61,00,6f,
00,31,00,32,00,33,00,2e,00,63,00,6f,00,6d,00,00,00

这段里的内容你最好是在注册表里看一下键值再导出来,好像是加了密的,我的这个在注册表里显示是”%ProgramFiles%Internet Exploreriexplore.exe” http://www.hao123.com,导出来就成了上面那串看不懂的数字!

这个不止可以禁止改主页,禁止其他的也可以,什么启动项啊这些东东.