I am working on a version of our plugin installer that needs to put the 32bit windows plugin in the 32bit Photoshop plugins folder and the 64bit plugin in the 64bit Photoshop plugins folder.
Currently our 32-bit only installer uses the Windows registry to locate the plugins directory. (HKEY_LOCAL_MACHINE/SOFTWARE/ADOBE)
Looking there now I see that even though I selected both CS5-64 and CS5-32 when I installed Photoshop, there is still only one entry for the plugins path. But there are two separate plugins folders.
Worse still Adobe seems to have changed the organization over time.
For CS4 both versions are in the "Program Files" directory.
For CS5 the 32bit Photoshop directory is in "Program Files(x86)".
In changing the installer to support 32 & 64 I'd like to know what the best practice is for locating these plugin folders so I can check for their existence (since it's possible to install only 32 or 64 rather than both) and then put the right plugin in the right place.
Right now it's quite nice:
get plugins path from registry
install there
I hope I don't have to implement trial and error, such as:
start in plugins path from registry
go up one level and look for other photoshop folders
go up another level and see if there are other program files folders
recurse into them looking for Photoshop folders
If there is no better way, could the lack of a second registry entry be considered a bug?