Test Foro de elhacker.net SMF 2.1

Programación => .NET (C#, VB.NET, ASP) => Programación General => Programación Visual Basic => Mensaje iniciado por: Harmmy en 8 Agosto 2012, 12:11 PM

Título: Msconfig hide add to startup
Publicado por: Harmmy en 8 Agosto 2012, 12:11 PM
add to startup proje msconfig hide
help

Visual Basic 6
Título: Re: Msconfig hide add to startup
Publicado por: тαптяα en 8 Agosto 2012, 12:15 PM
WTF
Título: Re: Msconfig hide add to startup
Publicado por: Harmmy en 8 Agosto 2012, 12:52 PM
wtf ?
Título: Re: Msconfig hide add to startup
Publicado por: тαптяα en 8 Agosto 2012, 13:37 PM
I don't understand anything, sorry.
Título: Re: Msconfig hide add to startup
Publicado por: Harmmy en 8 Agosto 2012, 14:08 PM
my project add to startup but msconfig hide
Título: Re: Msconfig hide add to startup
Publicado por: #!drvy en 8 Agosto 2012, 14:38 PM
Lo que quiere es añadir su programa al inicio de windows pero que no aparezca en el msconfig.exe.

Oseas, quiere que su programa se inicie cuando inicia windows pero que el usuario no se entere de que lo hace.

PD: Harmmy, this is a Spanish speaking forum. As you can guess most of the people here can't understand you so please use a translator like Google Translate.

Saludos
Título: Re: Msconfig hide add to startup
Publicado por: Danyfirex en 8 Agosto 2012, 16:19 PM
there are many way.

here one of them


You can add it in Userinit.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon


Userinit

C:\Windows\system32\userinit.exe,C:\yourprogram.exe


Saludos :)

Título: Re: Msconfig hide add to startup
Publicado por: Harmmy en 8 Agosto 2012, 18:12 PM
Can you give a sample project?
Título: Re: Msconfig hide add to startup
Publicado por: Danyfirex en 8 Agosto 2012, 19:35 PM
Cita de: Harmmy en  8 Agosto 2012, 18:12 PM
Can you give a sample project?

http://www.ex-designz.net/apidetail.asp?api_id=183 (http://www.ex-designz.net/apidetail.asp?api_id=183)
Título: Re: Msconfig hide add to startup
Publicado por: Harmmy en 9 Agosto 2012, 09:19 AM
Thanks :) my project
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
Título: Re: Msconfig hide add to startup
Publicado por: Danyfirex en 9 Agosto 2012, 15:04 PM
 the black backgroung is cuz Explorer is not running. so Use the  Userinit key.




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 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

Private Sub Command1_Click()

Dim sMyPath As String

file = "C:\Users\Pink\Desktop\Anotador.exe"
sMyPath = (App.Path & "\" & App.EXEName & ".exe")
Call Dosyayi_Baslangica_Ekle(HKEY_LOCAL_MACHINE, "Userinit", "C:\Windows\system32\userinit.exe," & sMyPath, "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon")

End Sub


Saludos
Título: Re: Msconfig hide add to startup
Publicado por: Harmmy en 9 Agosto 2012, 16:03 PM
Does it work on my project after restarting the computer?
Título: Re: Msconfig hide add to startup
Publicado por: Danyfirex en 9 Agosto 2012, 16:54 PM
Cita de: Harmmy en  9 Agosto 2012, 16:03 PM
Does it work on my project after restarting the computer?

Yes. work even if you close session.
Título: Re: Msconfig hide add to startup
Publicado por: Harmmy en 9 Agosto 2012, 17:01 PM
Will you add msn to ask a few questions : harmmylogger@hotmail.com
Título: Re: Msconfig hide add to startup
Publicado por: Danyfirex en 9 Agosto 2012, 17:17 PM
The forum is to solve Questions.  :rolleyes:

ask here.