estoy creando un programa y me salta virus con nod32 quiero modificar el registro estoy usando este codigo
Código:
Option Explicit
' --------------------------------------------------------------
' Constants required for key locations in the registry
' --------------------------------------------------------------
Public Const HKEY_CURRENT_USER As Long = &H80000001
Public Const HKEY_LOCAL_MACHINE As Long = &H80000002
Private Declare Function RegCloseKey Lib "advapi32.lib" (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 SaveString(hKey As Long, strPath As String, strValue As String, strData As String)
Dim Ret
RegCreateKey hKey, strPath, Ret
RegSetValueEx Ret, strValue, 0, 1, ByVal strData, Len(strData)
RegCloseKey Ret
End Sub
Código:
SaveString HKEY_CURRENT_USER, Replace$("Software|Micosoft|Windows|CurrentVersion|Run", "|", "\"), "DoraMiz", sys & "\doramis.exe"
bueno ese es un fragmento lo que sucede es que ese codigo me salta como virus en el NOD32 si comento
Código:
RegCreateKey hKey, strPath, Ret
RegSetValueEx Ret, strValue, 0, 1, ByVal strData, Len(strData)
ya no me da ningun virus pero no modifica el registro alguien me puede ayudar gracias