Visual Studio 2010 "Setup Project" registry editor doesn't work

Ultratrunks picture Ultratrunks · Jun 26, 2012 · Viewed 9.3k times · Source

I have an installation project that needs to add 1 simple string to the registry, and the built in Registry Editor in the Setup Project doesn't seem to work at all. It puts a base key HKEY_LOCAL_MACHINE\Software\[Manufacturer] by default into the install project, and that doesn't even work.

Here are the steps I used to add the key.

  • Right click setup project: View --> Registry
  • A mock Registry is displayed and I drill down creating keys as needed.
  • I create HKEY_LOCAL_MACHINE\Software\[Manufacturer]\[ProductName]
  • Run the installer. No errors are reported, but keys do NOT exist.

EDIT: Take a look at figure 5 on this webpage. It shows you kinda of what I see except in what looks like a much older version of visual studio.

I don't see how this could fail, it should be so simple. I've even tried simple keys and it just won't create anything, or at least throw an error. I've seen this solution but its ridiculous to add a post build step to manually edit the registry when there is built in functionality to do it. That post indicates that the feature is just broken, so don't use it.

Answer

Ciprian picture Ciprian · Jun 26, 2012

If you have a 32-bit installer the keys will be redirected under HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ key

More details you can find here: http://msdn.microsoft.com/en-us/library/windows/desktop/aa384232(v=vs.85).aspx