RE:COMO PEUDO HACER PARA AGREGAR UNA CADENA DE VAL
Mira yo encontre este codigo en internet y me ha funcinado perfectamente. espero que a ti tambien. Te envio un ejemplo por Mail.
Ok. Suerte....
Const REG_SZ = 1
Const REG_BINARY = 3
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 RegDeleteValue Lib "advapi32.dll" Alias "RegDeleteValueA" (ByVal hKey As Long, ByVal lpValueName As String) 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
Private Sub Command1_Click()
SaveString HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows\CurrentVersion\Run", "Cal", "c:\winnt\system32\calc.exe"
End Sub
Private Sub Command2_Click()
DelSetting HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows\CurrentVersion\Run", "Cal"
End Sub
Private Sub Form_Load()
Command1.Caption = "PONER CALCULADORA"
Command2.Caption = "QUITAR CALCULADORA"
End Sub