- Home
·
- Registry
·
- Functions to read/write/delete a registry key (Very small code + No API's!)
Functions to read/write/delete a registry key (Very small code + No API's!)
Functions to read/write/delete a registry key (Very small code + No API's!)
Rate Functions to read/write/delete a registry key (Very small code + No API's!)
(2(2 Vote))
Sub Main()
Dim RegObj, RegKey
Set RegObj = CreateObject("WScript.Shell")
RegKey = RegObj.RegRead("REGISTRY_KEY_TO_READ")
If RegKey = "" Then MsgBox "There is no registry value for this key!"
Else
MsgBox "Registry key value is " & RegKey & "!"
Set RegObj = Nothing
End If
End Sub
'Write a registry key
Sub Main()
Dim RegObj, RegKey As String
Set RegObj = CreateObject("WScript.Shell")
RegKey = "REGISTRY_KEY_TO_WRITE"
RegObj.RegWrite RegKey, "Value for the key goes here!"
Set RegObj = Nothing
End Sub
'Delete a registry key
Sub Main()
Dim RegObj
Set RegObj = CreateObject("WScript.Shell")
RegObj.RegDelete("REGISTRY_KEY_TO_DELETE")
Set RegObj = Nothing
End Sub
'Easy huh? ;-)
Functions to read/write/delete a registry key (Very small code + No API's!) Comments
No comments yet — be the first to post one!
Post a Comment