开发者

insert a variable value in Regwrite line

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 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜