- 帖子
- 17
- 积分
- 143
- 技术
- 0
- 捐助
- 0
- 注册时间
- 2009-10-13
|
如何用VBS添加注册表指定项?
导入注册表文件如下:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\SuperHidden]
@="{00000000-0000-0000-0000-000000000012}"
[HKEY_CLASSES_ROOT\CLSID\{00000000-0000-0000-0000-000000000012}\InProcServer32]
@=hex(2):25,53,79,73,74,65,6d,52,6f,6f,74,25,5c,73,79,73,74,65,6d,33,32,5c,73,\
68,64,6f,63,76,77,2e,64,6c,6c,00
"ThreadingModel"="Apartment"
[HKEY_CLASSES_ROOT\CLSID\{00000000-0000-0000-0000-000000000012}\Instance]
"CLSID"="{3f454f0e-42ae-4d7c-8ea3-328250d6e272}"
[HKEY_CLASSES_ROOT\CLSID\{00000000-0000-0000-0000-000000000012}\Instance\InitPropertyBag]
"method"="ShellExecute"
"Param1"="C:\\Windows\\ShowHide.VBS"
"command"="显示隐藏文件"
"CLSID"="{13709620-C279-11CE-A49E-444553540000}"
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"ShowSuperHidden"=dword:00000000
"Hidden"=dword:00000002
请问如何编写vbs脚本写入如上值!
我写了第一个是这样的:
Dim HiddenShowFile
Set HiddenShowFile=WScript.CreateObject("WScript.Shell")
HiddenShowFile.Write "HKCR\Directory\Background\shellex\ContextMenuHandlers\SuperHidden\", "{00000000-0000-0000-0000-000000000012}", "REG_SZ"
显示“对象不支持此属性或方法:‘Write’”
不知为何,请高人指教,不胜感激!谢谢! |
|