Change IE start page from my program - how?

  • Thread starter Thread starter Chris Shearer Cooper
  • Start date Start date
C

Chris Shearer Cooper

During installation, my program asks the user if they want to change
their browser start page, but even if they say "Yes" I'm unable to
modify the registry. If I open HKEY_CURRENT_USER\Software\Microsoft
\Internet Explorer\Main with KEY_READ and KEY_WRITE permissions and
then try to modify the "Start Page", it returns error 5
(ERROR_ACCESS_DENIED) and since I get an obnoxious error message when
I try to modify the item directly (in regedt32), I believe my code is
doing the right thing and it's some new Windows security thing.

What does my program need to do, in order to convince Windows (both XP
and Vista) that this operation is OK? A manifest with some magic
value inside? Code-signing the app?

Yes, I realize it is very likely that the anti-virus program will then
pop up and warn the user that this is happening, that's expected and
acceptable.

Thanks in advance,
Chris
 
Hi Chris,

I suspect your not opening the key with enough permissions such as the
ability to manipulate values...

Try opening the key with full rights, KEY_ALL_ACCESS if i'm not mistaken and
see if that helps - it's a HKCU key so you're safe to do that...

As you saw, error code 5 is access denied and given this is a HKCU key /
value you really shouldn't have a problem. There is nothing I know of that
puts such security methods to prevent this -

Cheers,
Jon

The Windows Registry Information Database - http://www.insidetheregistry.com
 
Back
Top