Results 1 to 8 of 8

Thread: Having trouble with a registry read

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2004
    Posts
    11

    Having trouble with a registry read

    I have a program that reads a value in the registry. When I "Debug" it, it works. When I build and run the EXE I get a Security Error.

    Is there something I need to do in the program that allows registry reads?

    Here is my code:

    key = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\SNAP Systems, Inc\WinSNAP\DefaultSite")
    DefaultSite = CType(key.GetValue(""), String)

    EDIT:
    Exact Error>
    Request for the permission of type
    System.Security.Permissions.RegistryPermission, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.


    Thank you
    Ron.
    PS: I'm not sure (because I'm a NOOBIE) if there is anything else you'll need to know. Please ask and I'll provide.
    Last edited by Capt_Ron; Jun 1st, 2004 at 01:43 PM.

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