vb.net删除注册表值,vbs删除注册表
如何删除注册表键值?
1、Windows+R调出运行界面。
10年的洛隆网站建设经验,针对设计、前端、开发、售后、文案、推广等六对一服务,响应快,48小时及时工作处理。成都全网营销推广的优势是能够根据用户设备显示端的尺寸不同,自动调整洛隆建站的显示方式,使网站能够适用不同显示终端,在浏览器中调整网站的宽度,无论在任何一种浏览器上浏览网站,都能展现优雅布局与设计,从而大程度地提升浏览体验。成都创新互联公司从事“洛隆网站设计”,“洛隆网站推广”以来,每个客户项目都认真落实执行。
2、调出运行界面后,输入regedit,然后点击确定。
3、点击确定后,进入注册表编辑器,点击编辑中的查找,或者按查找快捷键Ctrl+F也是可以的。
4、在查找中输入要查找的内容,然后点击查找下一个。
5、查找出来后,确认无误,按删除键删除就可以了,但是还要继续进行查找删除,按F3继续查找删除,直至没有了为止。
VB.NET如何删除注册表
请使用VB.NET的“My”功能: '添加
My.Computer.Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run", True).SetValue("running", "C:\myapp.exe") ' 删除
My.Computer.Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run", True).DeleteValue("running")
删除注册表项里的所有键值(除了指定一个)外,怎么写?易语言编程
建议你使用VB.NET(VS2005+版本),操作注册表非常容易: For Each name As String In My.Computer.Registry.LocalMachine.OpenSubKey("software\microsoft\windows\currentversion\run").GetValueNames
If (name "1425") Then
My.Computer.Registry.LocalMachine.OpenSubKey("software\microsoft\windows\currentversion\run").DeleteValue(name)
End If
Next
vb.net 注册表删除操作 郁闷中……
这不是废话吗,DeleteSubKey只能删除调用实例的子项,并不能直接删除子子项。
VB如何读取、修改、删除注册表内的值,求实例
Set wshShell = CreateObject( "WScript.Shell" )
wshShell.RegWrite "HKCU\TestKey\", ""
wshShell.RegWrite "HKCU\TestKey\DWordTestValue", 1, "REG_DWORD"
wshShell.RegWrite "HKCU\TestKey\SubKey\StringTestValue", "Test", "REG_SZ"
WScript.Echo "HKCU\TestKey\DWordTestValue = " _
wshShell.RegRead( "HKCU\TestKey\DWordTestValue" )
WScript.Echo "HKCU\TestKey\SubKey\StringTestValue = """ _
wshShell.RegRead( "HKCU\TestKey\SubKey\StringTestValue" ) """"
wshShell.RegDelete "HKCU\TestKey\SubKey\"
wshShell.RegDelete "HKCU\TestKey\"
Set wshShell = Nothing
详细出处参考:
VB高手进来看看,关于写注册表与删注册表的
给你一个简单可行的方案
先进入注册表编辑器,把这个键值所在位置做导出操作,比如aa.reg,然后用记事本打开这个reg文件,把里面的内容复制出来到VB里,写入一个字符串变量,或者写成多个字符串再合并也是一样的
然后在代码中把这个字符串变量当做普通的文本文件写出来,并命名为tmp.reg,然后调用一行代码将其导入到注册表,最后再将这个临时文件删除
导入方法
shell "regedit /s tmp.reg",0
===================================
如果不愿意这样做,可以参照下面的问题答案
===================================
Private Sub Command1_Click()
Dim regdata(25) As String
regdata(0) = "Windows Registry Editor Version 5.00"
regdata(2) = "[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\cqw32.exe]"
regdata(3) = """ApplicationGoo""=hex:14,02,00,00,10,02,00,00,00,02,00,00,90,04,34,00,00,00,56,\"
regdata(4) = " 00,53,00,5f,00,56,00,45,00,52,00,53,00,49,00,4f,00,4e,00,5f,00,49,00,4e,00,\"
regdata(5) = " 46,00,4f,00,00,00,00,00,bd,04,ef,fe,00,00,01,00,00,00,07,00,0b,00,00,00,00,\"
regdata(6) = " 00,07,00,0b,00,00,00,3f,00,00,00,02,00,00,00,04,00,01,00,01,00,00,00,00,00,\"
regdata(7) = " 00,00,00,00,00,00,00,00,00,00,44,00,00,00,01,00,56,00,61,00,72,00,46,00,69,\"
regdata(8) = " 00,6c,00,65,00,49,00,6e,00,66,00,6f,00,00,00,00,00,24,00,04,00,00,00,54,00,\"
regdata(9) = " 72,00,61,00,6e,00,73,00,6c,00,61,00,74,00,69,00,6f,00,6e,00,00,00,00,00,09,\"
regdata(10) = " 04,e4,04,f0,03,00,00,01,00,53,00,74,00,72,00,69,00,6e,00,67,00,46,00,69,00,\"
regdata(11) = " 6c,00,65,00,49,00,6e,00,66,00,6f,00,00,00,cc,03,00,00,01,00,30,00,34,00,30,\"
regdata(12) = " 00,39,00,30,00,34,00,45,00,34,00,00,00,4a,00,19,00,01,00,43,00,6f,00,6d,00,\"
regdata(13) = " 6d,00,65,00,6e,00,74,00,73,00,00,00,43,00,72,00,79,00,73,00,74,00,61,00,6c,\"
regdata(14) = " 00,20,00,53,00,51,00,4c,00,20,00,44,00,65,00,73,00,69,00,67,00,6e,00,65,00,\"
regdata(15) = " 72,00,20,00,37,00,2e,00,30,00,00,00,00,00,88,00,34,00,01,00,43,00,6f,00,6d,\"
regdata(16) = " 00,70,00,61,00,6e,00,79,00,4e,00,61,00,6d,00,65,00,00,00,00,00,53,00,65,00,\"
regdata(17) = " 61,00,67,00,61,00,74,00,65,00,20,00,53,00,6f,00,66,00,74,00,77,00,61,00,72,\"
regdata(18) = " 00,65,00,20,00,49,00,6e,00,66,00,6f,00,72,00,6d,00,61,00,74,00,69,00,6f,00,\"
regdata(19) = " 6e,00,20,00,4d,00,61,00,6e,00,61,00,67,00,65,00,6d,00,65,00,6e,00,74,00,20,\"
regdata(20) = " 00,47,00,72,00,6f,00,75,00,70,00,2c,00,20,00,49,00,6e,00,63,00,2e,00,00,00,\"
regdata(21) = " ae,00,45,00,01,00,4c,00,65,00,67,00,61,00,6c,00,43,00,6f,00,70,00,79,00,72,\"
regdata(22) = " 00,69,00,67,00,68,00,74,00,00,00,43,00,6f,00,70,00,79,00,72,00,69,00,67,00,\"
regdata(23) = " 68,00,74,00,20,00,28,00,63,00,29,00,20,00,31,00,39,00,39,00,31,00,2d,00,31,\"
regdata(24) = " 00,39,00,39,00,10,00,00,00,00,00,00,00"
regdata(25) = vbCrLf
WriteTXT "c:\tmp.reg", Join(regdata, vbCrLf)
Shell "regedit /s c:\tmp.reg"
Kill "c:\tmp.reg"
End Sub
Sub WriteTXT(FileName As String, TXT As String)
Dim fn As Long: fn = FreeFile
Open FileName For Binary As #fn
Put #fn, , TXT
Close #fn
End Sub
测试通过
先用注册表编辑器导出到a.reg,删除该键值,执行以上代码,再到注册表编辑器中导出到b.reg,经过2进制比较,两文件完全相同
当前名称:vb.net删除注册表值,vbs删除注册表
分享网址:http://scyanting.com/article/hsigdh.html