views:

96

answers:

1

I know I can simply write to the CommandBandLayout regkey but since I don't know what format it is I'm having doubts if that is safe.

Also, this answer suggest it's the wrong solution: http://stackoverflow.com/questions/1239266/how-to-modify-commandbandlayout-reg-key-value

But how can I change the order a bit? I have written an Internet Explorer Add-on and I've registered it by putting it in HKCU but by default it falls off the screen so users are having trouble finding it. I would like to make the bar wider or move the button back in the screen.

+1  A: 

You cannot re-arrange IE's toolbar layout. IE manages it, and users can customize it using the built-in UI, but you can't. Sorry.

Actually you can, as you've noticed that the layout is persisted in a binary format in the registry, but it involves a lot of reverse engineering of binary data that may or may not be stored in the registry and since it's an undocumented implementation detail, the IE team can (and actually does) change how it works in every new version of IE. You'd have to write the code three times: once for IE6, once for IE7, once for IE8. And again for IE9 when it ships, and there's no certainty it would be the same anyway. Each one uses a different format and has different rules about when data and how the data is persisted. And forget about the upgrade scenarios.

So, tell whoever made that requirement that you can't do it.

No really, push back. I've actually been on both sides of this equation; I was on the IE team and saw the disasters that extensions caused when they tried to do this, and I've been at companies who had the same requirements and I've done the reverse engineering and tried to keep it working. Trust me, you don't want to do this.

jeffamaphone