Results 1 to 5 of 5

Thread: SaveSetting Error

  1. #1

    Thread Starter
    PowerPoster lintz's Avatar
    Join Date
    Mar 2003
    Location
    The 19th Hole
    Posts
    2,697

    SaveSetting Error

    When using the below code to save a registration key for our app, a new user (I can't replciate it) is getting a runtime error 5 message.

    For the life of me I can't see how the error is being generated I could add "On Error Resume Next" but each time the user opens the program it will ask for a registration key again which we can't have happen?

    MSDN states "An error occurs if the key setting can’t be saved for any reason." Not very helpful

    Does the user need to have admin privilages for the key to be saved in the registry? Any suggestions?

    VB Code:
    1. Private Sub SaveRegSetting(sRegText As String)
    2.                    
    3.       SaveSetting "ProgramName", "Registration", "Entry", sRegText
    4.  
    5. End Sub

  2. #2

  3. #3

    Thread Starter
    PowerPoster lintz's Avatar
    Join Date
    Mar 2003
    Location
    The 19th Hole
    Posts
    2,697

    Re: SaveSetting Error

    Thanks gavio, I'll get the user to check and modify if required.

  4. #4
    PowerPoster gavio's Avatar
    Join Date
    Feb 2006
    Location
    GMT+1
    Posts
    4,462

    Re: SaveSetting Error

    Well, if he's in a RESTRICTED group then by default he doesn't have full control (he can only read). I don't have any accounts but mine so i really can't try...

  5. #5

    Thread Starter
    PowerPoster lintz's Avatar
    Join Date
    Mar 2003
    Location
    The 19th Hole
    Posts
    2,697

    Re: SaveSetting Error

    gavio, I modified my account to deny any keys being saved and got the same runtime error when trying to save anything to the registry.

    I think permissions is the prob so will contact the user to change their settings and try again.

    Thanks

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