Edit the registry. If a key is missing, add it. I've always done it manually. Here's an article I found that describes the manual process:
How to Modify the Windows Registry
If you want information on automating this, go to the MSDN Library and do a search for 'registry functions':