[Question]Regwrite menu

Shout-Out

User Tag List

Results 1 to 6 of 6
  1. #1
    1337person's Avatar Active Member
    Reputation
    21
    Join Date
    Aug 2007
    Posts
    119
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Question]Regwrite

    Hi

    I'm Writing a "Virus" that rick rolls you (Yes you heard it! Rick roll) But i just got kind of stuck, google did not solve my problem either.
    I'm pretty new to Vb so i dont know really much YET.
    what im wondering is, How can i make it add itself to the autostart Reg when its started?
    i know its prolly a simpel question but i wold be thankful if u could help me with this.

    [Question]Regwrite
  2. #2
    Murdok's Avatar Member
    Reputation
    34
    Join Date
    Oct 2007
    Posts
    69
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you want it to start up with windows?

    in vb6 you can do

    In a module

    General
    Code:
    Private Const READ_CONTROL As Long = &H20000
    Private Const STANDARD_RIGHTS_WRITE As Long = (READ_CONTROL)
    Private Const KEY_SET_VALUE As Long = &H2
    Private Const KEY_CREATE_SUB_KEY As Long = &H4
    Private Const SYNCHRONIZE As Long = &H100000
    Private Const KEY_WRITE As Long = _
    ((STANDARD_RIGHTS_WRITE Or KEY_SET_VALUE Or KEY_CREATE_SUB_KEY) And (Not SYNCHRONIZE))
    Private Const HKEY_LOCAL_MACHINE As Long = &H80000002
    Private Const REG_SZ As Long = 1
    Private Declare Function RegOpenKeyEx Lib "advapi32.dll" Alias "RegOpenKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal samDesired As Long, 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         ' Note that if you declare the lpData parameter as String, you must pass it By Value.
    Private Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long
    Dim str As String
    and

    function

    Code:
    Public Function startup(Optional uninstall As Boolean)
      subKey = "software\microsoft\windows\currentversion\run"
    
      Size = Len(str)
      
      'Open key
      RegOpenKeyEx HKEY_LOCAL_MACHINE, subKey, 0, KEY_WRITE, Key
      
      'Set Value of key
      RegSetValueEx Key, "PROGRAM NAME", 0, REG_SZ, ByVal str, Size
      
      'Close key
      RegCloseKey Key
    End Function
    then say in your form load or where ever you wanna put it

    Code:
    StartUp
    Last edited by Murdok; 11-04-2008 at 05:11 PM.

  3. #3
    1337person's Avatar Active Member
    Reputation
    21
    Join Date
    Aug 2007
    Posts
    119
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ye

    and i use VB.net 2008 Express


    Ty Man and u deserv 2+ rep for it
    Last edited by 1337person; 11-04-2008 at 05:14 PM.

  4. #4
    1337person's Avatar Active Member
    Reputation
    21
    Join Date
    Aug 2007
    Posts
    119
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i get around 9 errors when i past in the function Lot of em aint Declared

  5. #5
    Murdok's Avatar Member
    Reputation
    34
    Join Date
    Oct 2007
    Posts
    69
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i think its because your using vb.net totally different to vb6

    here you go i think this is what you need

    http://www.dreamincode.net/forums/showtopic21106.htm
    Last edited by Murdok; 11-04-2008 at 05:32 PM.

  6. #6
    1337person's Avatar Active Member
    Reputation
    21
    Join Date
    Aug 2007
    Posts
    119
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wold this code work?


    dim regkey
    filecopy app.path & "\" & app.exename & ".exe" , "C:\windows\system32\newapp.exe"
    set regkey = createobject("wscript.shell")
    regkey.regwrite "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\newapp.exe", "c:\windows\system32\newapp.exe"

    Also, if i want to remove it from autostart i need to Make a bat file that removes it from the reg right?
    Last edited by 1337person; 11-05-2008 at 02:18 PM.

Similar Threads

  1. Model Changing Question
    By MasterYuke in forum World of Warcraft General
    Replies: 6
    Last Post: 09-17-2006, 09:56 PM
  2. Couple Private Server questions
    By Jboz in forum World of Warcraft General
    Replies: 21
    Last Post: 07-26-2006, 07:37 PM
  3. Sorry..newb mail question
    By nolbishop in forum World of Warcraft General
    Replies: 2
    Last Post: 06-07-2006, 07:21 PM
  4. Question..
    By janzi9 in forum Community Chat
    Replies: 3
    Last Post: 04-02-2006, 10:20 AM
  5. A GALB question
    By bassman in forum World of Warcraft General
    Replies: 4
    Last Post: 03-28-2006, 09:49 AM
All times are GMT -5. The time now is 06:07 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search