如何在编写的.reg中加入注释????

如何在编写的.reg中加入注释????,第1张

看看例子: 以分号开头的行全是注释.

I got this tip at http://www.microsoft.com/mspress/books/sampchap/6232a.asp

this allows you to do Google searches directly from your Internet Explorer

address bar -- just type "google" plus your search terms (for example,

type "google lotus domino" to do a Google search for "lotus domino")

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchUrl\google]

@="http://www.google.com/search?q=%s"

" "="+"

"%"="%25"

"&"="%26"

"+"="%2B"

These first two changes are recommended by Lotus:

The default for this setting is 1

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management]

"LargeSystemCache"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management]

This registry change is recommended for servers with an L2 cache

of greater than 256 MB. The value of 200 below represents 512 in

hex notation, so it is geared towards a server with a 512K cache.

DO NOT use a value higher than the amount of L2 cache you have!

And don't forget to use a hex number!

Default value is 0.

"SecondLevelDataCache"=dword:00000200

These two entries were recommended by Microsoft Knowledgebase articles

Q192409 and Q171458. Along with SP4, they are supposed to help fix

crashes caused by the opening of large files and can possibly improve

performance.

By default, these entries don't exist.

"DisablePagedPoolHint"=dword:00000001

"UnusedFileCache"=dword:0000000f

如何写注册表文件

.reg文件的标准格式如下:

REGEDIT4

[路径] (注意用大小写)

"键名"="键值" (针对字符串型键值)

"键名"=hex:键值 (针对二进制型键值)

"键名"=dword:键值 (针对DWORD键值)

括号里面的内容为本人的注释,写文件的时候就不需要那些小括号了,其他上面所列的都必须包括。注意引号输入时不能用中文输入的引号,必须用英文的引号,否则会出错。

那么,怎么写.reg文件呢?我们需要一个文本编辑器,用windows的记事本就可以了。单击鼠标右键,选择新建文本文档,然后在生成的文本文件里输入上面规格的内容就可以了,最后,选择另存为,输入你想要的文件名+.reg保存即可。比如你要生成test.reg,输入test.reg保存即可,你可以看到生成了一个带图标的test.reg.双击运行这个test.reg文件就能相应的修改注册表了,系统会提示“是否导入注册表”之类的信息,确定就可以了。OK,我们可以手动写注册表了,是不是感觉很酷?

先别急,我们来看看一个标准范例,这是从注册表里面导出来的,大家慢慢学习,跟着模仿一下就能写出自己的.reg文件了。

REGEDIT4

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]

"NoRun"=dword:00000000

"NoRecentDocsMenu"=hex:01,00,00,00

"NoFavoritesMenu"=dword:00000000

"user"="sundrink"

大家可以看到,dword是16进制,hex是二进制,字符串则可以直接赋值。只要将上面的内容复制保存到文本文档里,然后另存为你想要的.reg文件运行就可以了。呵呵,原来也不是很难嘛,耐心一点就可以了。当然,你要模仿,要自己动手写.reg文件,用记事本就可以了。

说多两句,为什么要手写注册表?因为有时候我们会碰到一台锁定regedit的机子,有什么办法解开呢?呵呵,如果你会手写注册表文件的话,那很简单了......大家发挥想象吧!用不了很长时间的。

[HKEY_CURRENT_USER\Control Panel\Desktop]

"HungAppTimeout"="200"

"WaitToKillAppTimeout"="1000"

::加速系统开机和关机


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/tougao/11680258.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-05-17
下一篇2023-05-17

发表评论

登录后才能评论

评论列表(0条)

    保存