共用方式為


checkin policies in HKLM on 64-bit machines - need to go into Wow6432Node!

One thing you may have noticed in the MSDN docs or my blog is that if you're installing checkin policies, the registry value you add to specify that path to the checkin policy goes under the key HKLM\SOFTWARE\Microsoft\VisualStudio\8.0\TeamFoundation\SourceControl\Checkin Policies

There's a case where this isn't true, though - since VS2005 doesn't have native 64-bit support (it's a 32-bit application), it runs in WOW64 mode on 64-bit Windows.  One of the implications of running in WOW64 mode is that you may not access the same registry keys as native 64-bit apps (1, 2).

This means that if you're installing your checkin policy's registry value into HKLM, you'll need to add a "Wow6432Node" part after "Software" to the path.  That way, it'll be in the right place when we go to find the installed policies on the machine.

As an example, here's how you would install a MyPolicy assembly in such a situation:

reg add "HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\8.0\TeamFoundation\SourceControl\Checkin Policies" /v MyPolicy /d "C:\some\path\MyPolicy.dll"

Note that since HKCU doesn't participate in the registry reflection, you don't need to add the Wow6432Node part to the path if you install your policy there.  Of course, though, then it's only available to your user on that particular machine.

Comments

  • Anonymous
    March 17, 2006
    Rob Caron Blog Roundup:

    Organizing Team Projects
    Team System Wins Jolt Award
    Upgrading To Team Foundation...
  • Anonymous
    March 20, 2006
    You only need to add the Wow6432Node indirection if you are adding the registry key from a 64 bit application.  

    So if you are manually adding the info to the registry through Regedit or double clicking a .REG file then this is necessary.  

    However, if you are manipulating the registry from a 32-bit application then the redirection happens on your behalf automatically.