Results 1 to 4 of 4

Thread: local machine access error?!!

  1. #1

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    local machine access error?!!

    I cant access the local machine subkey with teh registry class. it says I dont have access. Why? it's only like this with the LocalMachine key


    edit: I was trying to add a key to LocalMachine\Software\Microsoft\Windows\CurrentVersion\Run
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Post the code you are using.

  3. #3
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    VB Code:
    1. Imports Microsoft.Win32
    2.  
    3.         Dim sKey As RegistryKey = Registry.LocalMachine.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Run", [color=red]True[/color])
    4.         Dim value As String = sKey.GetValue("NoteTracker")
    5.         sKey.SetValue("NoteTracker", Application.ExecutablePath)
    6.         sKey.Close()

    Make sure you have TRUE in the OpenSubKey because that allows you to edit the values.

  4. #4

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    hmmm, it's very weird. I was runnign the exact same thing yesterday and I was getting that error. But I dont get the error anymore (even without passing True to the function)
    anyways, thanks for the tip, I'll use that
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width