VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Only a few lines to create and write a Reg.Key (RegEdit)

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)

Rate 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


Download this snippet    Add to My Saved Code

Only a few lines to create and write a Reg.Key (RegEdit) Comments

No comments have been posted about Only a few lines to create and write a Reg.Key (RegEdit). Why not be the first to post a comment about Only a few lines to create and write a Reg.Key (RegEdit).

Post your comment

Subject:
Message:
0/1000 characters