|
-
Nov 24th, 2002, 07:11 PM
#1
Thread Starter
PowerPoster
Cannot write to registry key
I am getting an exception when I try to set this registry setting:
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\Display Inline Images
It says:
Cannot write to the registry key.
That is all it says...
Anyone have a reason why?
-
Nov 24th, 2002, 08:03 PM
#2
Sleep mode
if I'm not mistaken you have to edit the reg before writing .
Do you think any security reasons behind that.I bet so
-
Nov 24th, 2002, 08:22 PM
#3
can you edit anything else in CurrentUser, beside the explorer's setting?
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!!
-
Nov 24th, 2002, 09:55 PM
#4
Thread Starter
PowerPoster
Yes, I can edit and create other keys in the current user section. I use the HKEY_CURRENT_USER\Software\MySoftware section for my other app settings with no problems. It is like MS set up a security thing or something on their settings.
-
Nov 25th, 2002, 10:55 AM
#5
Hyperactive Member
I hope this isn't a duplicate of what you already have, but I just tested this on mine and it worked.
VB Code:
Dim reg As Microsoft.Win32.Registry
Dim rk As Microsoft.Win32.RegistryKey
rk = reg.CurrentUser.OpenSubKey("Software\Microsoft\Internet Explorer\Main", True)
rk.SetValue("Display Inline Images", MyValue)
-
Nov 25th, 2002, 11:30 AM
#6
Thread Starter
PowerPoster
I didn't include true as an argument for the opensubkey function. That is probably what I am doing wrong....lol. Thanks, I will try it.
-
Nov 25th, 2002, 02:53 PM
#7
-
Nov 25th, 2002, 05:47 PM
#8
Sleep mode
so the problem was with security or returning value??
-
Jan 6th, 2009, 04:33 AM
#9
New Member
Re: Cannot write to registry key
Code given by MagellanTX is correct. Make sure that the user under which you run your application has a right to change the registry.
-
Jan 6th, 2009, 04:41 AM
#10
Sleep mode
Re: Cannot write to registry key
 Originally Posted by exaspring
Code given by MagellanTX is correct. Make sure that the user under which you run your application has a right to change the registry.
Dude , this thread is almost 7 years ago !!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|