Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[HELP VB2008] How would I edit regedit

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
OSIRIS
Grandmaster Cheater
Reputation: 0

Joined: 27 Aug 2006
Posts: 654

PostPosted: Tue Mar 11, 2008 10:34 pm    Post subject: [HELP VB2008] How would I edit regedit Reply with quote

How would I edit parts of the regedistry. For example I want to add this string
Code:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run


and run C:\Windows\System32\program.exe
Back to top
View user's profile Send private message
AndrewMan
Grandmaster Cheater Supreme
Reputation: 0

Joined: 01 Aug 2007
Posts: 1257

PostPosted: Tue Mar 11, 2008 10:35 pm    Post subject: Reply with quote

Ahh I used to remember lemme think...

Ill get back to you tommororow night after school, gotta finish french HW than sleep.

_________________
Back to top
View user's profile Send private message
OSIRIS
Grandmaster Cheater
Reputation: 0

Joined: 27 Aug 2006
Posts: 654

PostPosted: Tue Mar 11, 2008 10:39 pm    Post subject: Reply with quote

kk
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Tue Mar 11, 2008 10:42 pm    Post subject: Reply with quote

RegistryKey class.

http://msdn2.microsoft.com/en-us/library/microsoft.win32.registrykey.aspx
Back to top
View user's profile Send private message
OSIRIS
Grandmaster Cheater
Reputation: 0

Joined: 27 Aug 2006
Posts: 654

PostPosted: Tue Mar 11, 2008 10:47 pm    Post subject: Reply with quote

slovach wrote:
RegistryKey class.

http://msdn2.microsoft.com/en-us/library/microsoft.win32.registrykey.aspx


I dont get it. What do I do with the code they give me.

Code:

Imports Microsoft.VisualBasic
Imports System
Imports System.Security.Permissions
Imports Microsoft.Win32

<Assembly: RegistryPermissionAttribute( _
    SecurityAction.RequestMinimum, ViewAndModify := "HKEY_CURRENT_USER")>

Public Class RegKey
    Shared Sub Main()

        ' Create a subkey named Test9999 under HKEY_CURRENT_USER.
        Dim test9999 As RegistryKey = _
            Registry.CurrentUser.CreateSubKey("Test9999")

        ' Create two subkeys under HKEY_CURRENT_USER\Test9999.
        test9999.CreateSubKey("TestName").Close()
        Dim testSettings As RegistryKey = _
            test9999.CreateSubKey("TestSettings")

        ' Create data for the TestSettings subkey.
        testSettings.SetValue("Language", "French")
        testSettings.SetValue("Level", "Intermediate")
        testSettings.SetValue("ID", 123)
        testSettings.Close()

        ' Print the information from the Test9999 subkey.
        Console.WriteLine("There are {0} subkeys under Test9999.", _
            test9999.SubKeyCount.ToString())
        For Each subKeyName As String In test9999.GetSubKeyNames()
            Dim tempKey As RegistryKey = _
                test9999.OpenSubKey(subKeyName)
            Console.WriteLine(vbCrLf & "There are {0} values for " & _
                "{1}.", tempKey.ValueCount.ToString(), tempKey.Name)
            For Each valueName As String In tempKey.GetValueNames()
                Console.WriteLine("{0,-8}: {1}", valueName, _
                    tempKey.GetValue(valueName).ToString())
            Next
        Next

        ' Delete the ID value.
        testSettings = test9999.OpenSubKey("TestSettings", True)
        testSettings.DeleteValue("id")

        ' Verify the deletion.
        Console.WriteLine(CType(testSettings.GetValue( _
            "id", "ID not found."), String))
        testSettings.Close()

        ' Delete or close the new subkey.
        Console.Write(vbCrLf & "Delete newly created " & _
            "registry key? (Y/N) ")
        If Char.ToUpper(Convert.ToChar(Console.Read())) = "Y"C Then
            Registry.CurrentUser.DeleteSubKeyTree("Test9999")
            Console.WriteLine(vbCrLf & "Registry key {0} deleted.", _
                test9999.Name)
        Else
            Console.WriteLine(vbCrLf & "Registry key {0} closed.", _
                test9999.ToString())
            test9999.Close()
        End If

    End Sub
End Class


Back to top
View user's profile Send private message
AndrewMan
Grandmaster Cheater Supreme
Reputation: 0

Joined: 01 Aug 2007
Posts: 1257

PostPosted: Tue Mar 11, 2008 10:50 pm    Post subject: Reply with quote

First Declare these

Code:
Visual Basic (Declaration)

<ComVisibleAttribute(True)> _
Public NotInheritable Class RegistryKey _
    Inherits MarshalByRefObject _
    Implements IDisposable


Than copy and paste that huge code. Not sure where though. Try a button and than when you click that it will make a registry key.

_________________
Back to top
View user's profile Send private message
sponge
I'm a spammer
Reputation: 1

Joined: 07 Nov 2006
Posts: 6009

PostPosted: Tue Mar 11, 2008 11:36 pm    Post subject: Re: [HELP VB2008] How would I edit regedit Reply with quote

mageknight wrote:
How would I edit parts of the regedistry. For example I want to add this string
Code:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run


and run C:\Windows\System32\program.exe
Oh god. Rolling Eyes

Anyways... http://msdn2.microsoft.com/en-us/library/ms724880%28VS.85%29.aspx

_________________
Back to top
View user's profile Send private message
Estx
Expert Cheater
Reputation: 0

Joined: 04 Mar 2008
Posts: 172

PostPosted: Wed Mar 12, 2008 7:43 am    Post subject: Reply with quote

Use:
Code:
Microsoft.Win32.Registry.LocalMachine.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Run").SetValue("name", "c:\program.exe");


I can't remember if VB uses absolutes off by heart (been a while since I've used it) but if it does, just change the code to either:
Code:
Microsoft.Win32.Registry.LocalMachine.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Run").SetValue("name", @"c:\program.exe");

or
Code:
Microsoft.Win32.Registry.LocalMachine.OpenSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Run").SetValue("name", "c:\\program.exe");


That's all the code you should need.


Last edited by Estx on Wed Mar 12, 2008 8:22 am; edited 1 time in total
Back to top
View user's profile Send private message
Haxory'
Grandmaster Cheater Supreme
Reputation: 92

Joined: 30 Jul 2007
Posts: 1900

PostPosted: Wed Mar 12, 2008 8:03 am    Post subject: Reply with quote

wrong title

[HELP VB2008] How would I edit regedit

you should use:
[HELP VB2008] How would I edit the registry

because regedit is made up of two parts
regedit

it simply means: registry edit

_________________
you and me baby ain't nothing but mammals so lets do it like they do on the discovery channel
Back to top
View user's profile Send private message
AndrewMan
Grandmaster Cheater Supreme
Reputation: 0

Joined: 01 Aug 2007
Posts: 1257

PostPosted: Wed Mar 12, 2008 2:23 pm    Post subject: Reply with quote

haxory' wrote:
wrong title

[HELP VB2008] How would I edit regedit

you should use:
[HELP VB2008] How would I edit the registry

because regedit is made up of two parts
regedit

it simply means: registry edit


Thanks smart guy Rolling Eyes

_________________
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites