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
Don’t use
wshshellwhen 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.