Vb.net 在Regwrite行中插入变量值
嗨,我有一个名为VAR1的变量,我需要在我的regkey中插入变量值,其中显示140 我该怎么做Vb.net 在Regwrite行中插入变量值,vb.net,variables,registry,Vb.net,Variables,Registry,嗨,我有一个名为VAR1的变量,我需要在我的regkey中插入变量值,其中显示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\SOF
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
当您可以使用框架时,请不要使用wshshell,请看一看已经在web上的许多示例中的一个。或者看看众多重复问题中的一个。不错,但这种方法对我最有效,除非因为它无疑是我问题的根本原因。。。