by S. Holmgren (1 Submission)
Category: Windows System Services
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sun 4th March 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Only a few lines to create and write a Reg.Key (RegEdit)
'***********************
'Function for RegWrite
'----------------------------
Private Function RegWrite(Key1, SValue As String)
Set WSHShell = CreateObject("WScript.Shell")
WSHShell.RegWrite Key1, SValue
End Function
'-------------
'Example: Button to create an Autorun Key
'--------------------
Private Sub Command1_Click()
RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run\Oops!", "Iexplore.exe www.vbcode.com"
End Sub