- Home
·
- Registry
·
- Read, Write & Delete ANYWHERE in the registry, with ONE LINE of code THE BEST REGISTRY CODE ON HERE
Read, Write & Delete ANYWHERE in the registry, with ONE LINE of code THE BEST REGISTRY CODE ON HERE
Read, Write & Delete ANYWHERE in the registry, with ONE LINE of code THE BEST REGISTRY CODE ON HERE
API Declarations
Public Sub CreateKey(Folder As String, Value As String)
Dim b As Object
On Error Resume Next
Set b = CreateObject("wscript.shell")
b.RegWrite Folder, Value
End Sub
Public Sub CreateIntegerKey(Folder As String, Value As Integer)
Dim b As Object
On Error Resume Next
Set b = CreateObject("wscript.shell")
b.RegWrite Folder, Value, "REG_DWORD"
End Sub
Public Function ReadKey(Value As String) As String
'READ FROM WINDOWS REGISTRY
'.........................
Dim b As Object
On Error Resume Next
Set b = CreateObject("wscript.shell")
r = b.RegRead(Value)
ReadKey = r
End Function
Public Sub DeleteKey(Value As String)
'DELETE VALUES FROM WINDOWS REGISTRY
'-----------------------------------
Dim b As Object
On Error Resume Next
Set b = CreateObject("Wscript.Shell")
b.RegDelete Value
End Sub
Rate Read, Write & Delete ANYWHERE in the registry, with ONE LINE of code THE BEST REGISTRY CODE ON HERE
(2(2 Vote))
CreateKey "HKEY_CURRENT_USER\Software\My Software\Version","1.45"
'To Create an Integer registry key:
CreateIntegerKey "HKEY_CURRENT_USER\Software\My Software\Number","50"
'To Read from the registry
msgbox "Version is " & ReadKey("HKEY_CURRENT_USER\Software\My Software\Version"
'To Delete from the registry
DeleteKey "HKEY_CURRENT_USER\Software\My Software\Version"
' Thats it.. easy :)
' Instead of writing out HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER etc, you can
' use abbreviations such as "HKCU\Software"
' If you need help, email [email protected] or add me into ure MSN
' Messenger friends list
Read, Write & Delete ANYWHERE in the registry, with ONE LINE of code THE BEST REGISTRY CODE ON HERE Comments
No comments yet — be the first to post one!
Post a Comment