- Home
·
- Miscellaneous
·
- Simplest code to write into windows registry without using any API Calls using very few lines of co
Simplest code to write into windows registry without using any API Calls using very few lines of co
Simplest code to write into windows registry without using any API Calls using very few lines of code for any further details mail me:
API Declarations
Create a form add three command buttons and add the following code
Note: You can write any where into the registry
Conact me [email protected]
use HKCU for HKEY_CURRENT_USER
use HKLM for HKEY_LOCAL_MACHINE
use HKCR for HKEY_CLASSES_ROOT & HKEY_USERS & HKEY_CURRENT_CONFIG
Happy Coding !
Rate Simplest code to write into windows registry without using any API Calls using very few lines of co
(1(1 Vote))
Command1.Caption = "Write"
Command2.Caption = "Read"
Command3.Caption = "Delete"
End Sub
Private Sub Command1_Click()
'WRITE INTO WINDOWS REGISTRY
'----------------------------
Dim b As Object
On Error Resume Next
Set b = CreateObject("wscript.shell")
b.RegWrite "HKCU\VBCODE.COM\Value", "HELLO WORLD"
b.RegWrite "HKCU\VBCODE.COM\Value1", 0, "REG_DWORD"
b.RegWrite "HKCU\VBCODE.COM\Value2", 0, "REG_SZ"
b.RegWrite "HKCU\VBCODE.COM\Value3", 0, "REG_BINARY"
End Sub
Private Sub Command2_Click()
'READ FROM WINDOWS REGISTRY
'.........................
Dim b As Object
On Error Resume Next
Set b = CreateObject("wscript.shell")
R = b.RegRead("HKCU\VBCODE.COM\Value")
Form1.Caption = R
End Sub
Private Sub Command3_Click()
'DELETE VALUES FROM WINDOWS REGISTRY
'-----------------------------------
Dim b As Object
On Error Resume Next
Set b = CreateObject("Wscript.Shell")
b.RegDelete "HKCU\VBCODE.COM\Value"
b.RegDelete "HKCU\VBCODE.COM\Value1"
b.RegDelete "HKCU\VBCODE.COM\Value2"
b.RegDelete "HKCU\VBCODE.COM\Value3"
End Sub
Simplest code to write into windows registry without using any API Calls using very few lines of co Comments
No comments yet — be the first to post one!
Post a Comment