在 Regwrite 行中插入变量值
您好,我有一个名为 VAR1 的变量,我需要将变量值插入到我的注册表项中,其中显示 140 我该怎么做......
Private Sub OKAY_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OKAY.Click
Dim wshshell
wshshell = CreateObject("WScript.Shell")
wshshell.RegWrite("HKLM\SOFTWARE\Microsoft\windows\CurrentVersion\policies\Explorer\NoDrives", 140, "REG_DWORD")
End Sub
Hi I have a variable creativly named VAR1 I need to insert the variables value in my regkey where it says 140
how do i do this....
Private Sub OKAY_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OKAY.Click
Dim wshshell
wshshell = CreateObject("WScript.Shell")
wshshell.RegWrite("HKLM\SOFTWARE\Microsoft\windows\CurrentVersion\policies\Explorer\NoDrives", 140, "REG_DWORD")
End Sub
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当您可以使用该框架时,请勿使用
wshshell
,请查看网络上已有的有关如何执行此操作的众多示例之一。 例如。或者查看关于SO的许多重复问题之一。Don't use
wshshell
when you can use the framework, look at one of the many examples of how to do it, already on the web. For instance. Or look at one of the many duplicate questions on SO.