Programming Sins Regarding the Registry (Using the Example of Microsoft Excel)
|
by Helge Klein on 08/13/2009 | 2 Comments | 2,288 Views
|
While browsing through the registry I found the following "gem". It illustrates nicely how programmers are not supposed to store settings in the registry:
[HKEY_CURRENT_USER\Software\Microsoft\Internet
Explorer\MenuExt\Nach
Microsoft E&xel exportieren]
@="res://C:\\PROGRA~2\\MICROS~1\\Office12\\EXCEL.EXE/3000"
"Contexts"=dword:00000001
What is wrong with this? Several things:
- Localization: Never localize keys or values in the registry (the same applies to configuration files, of course).
- Spelling: Do not misspell the name of your product.
- Short paths: Never use short paths.
- Absolute paths: Use variables like %ProgramFiles% instead of absolute paths.
- Default value: A registry key's default value is relict from Windows 3.1. Use named values instead.
Note: This is from a Windows 7 machine with Office 2007 installed (no older Office versions present!).
- ‹‹‹ previous Article
- 89 of 132
- next Article ›››
[WORKSHOP] Profitieren Sie von den besonderen Erfahrungen der sepago Berater im Bereich SCCM und APP-V. Nehmen Sie jetzt Kontakt mit uns auf.
2 responses for "Programming Sins Regarding the Registry (Using the Example of Microsoft Excel)" |
Add Comment
![]() |
Helge Klein IT-Architect Blogs about Windows, Terminal Services and other things Personal Profile Personal Blog RSS-Feed ![]() Twitter: HelgeKlein ![]() |
|
Latest posts
Most viewed
| 38,150 Views |
Where is the Hosts File on Windows x64? |
| 30,302 Views |
Deleting a Local User Profile - Not as easy as one Might Assume |
| 20,851 Views |
How to Reduce the Size of Roaming Profiles |






Thanks Helge! This was a
Thanks Helge! This was a good laugh and I really needed that today. BTW, you can\'t fault them too much for the shortened paths. Because they used the default value key they couldn\'t exact use a REG_EXPAND_SZ. Though they could certain do the delayed expansion in their code I supposed. There\'s just so many things wrong with this it\'s funny.
Shawn