Skip to main content
Participant
June 24, 2011
Answered

Application and Plugin paths (32 vs 64 Windows)

  • June 24, 2011
  • 1 reply
  • 1191 views

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?

This topic has been closed for replies.
Correct answer neat-o

Adobe didn't change the registry organization, Windows did.

I write the installers for my company, too, so I am pretty familiar with this.

On 64 bit Windows, the registry path you see when you get the keys in HKEY_LOCAL_MACHINE/SOFTWARE/ADOBE are the 64 bit values if you're calling the registy API from a 64 bit process. They are the 32 bit values if you're calling the registry API from a 32 bit process.

So, you can either write seperate 32 and 64 bit installers, or you can become intimately familiar with the registry redirection that takes place on 64 bit windows. ( None of this is a concern on 32 bit-only installations of Windows )

To learn about registry redirection go here:

http://msdn.microsoft.com/en-us/library/aa384232(v=vs.85).aspx

This is a very important page for installer writers to read:

http://msdn.microsoft.com/en-us/library/aa384129(v=vs.85).aspx

1 reply

neat-oCorrect answer
Inspiring
June 27, 2011

Adobe didn't change the registry organization, Windows did.

I write the installers for my company, too, so I am pretty familiar with this.

On 64 bit Windows, the registry path you see when you get the keys in HKEY_LOCAL_MACHINE/SOFTWARE/ADOBE are the 64 bit values if you're calling the registy API from a 64 bit process. They are the 32 bit values if you're calling the registry API from a 32 bit process.

So, you can either write seperate 32 and 64 bit installers, or you can become intimately familiar with the registry redirection that takes place on 64 bit windows. ( None of this is a concern on 32 bit-only installations of Windows )

To learn about registry redirection go here:

http://msdn.microsoft.com/en-us/library/aa384232(v=vs.85).aspx

This is a very important page for installer writers to read:

http://msdn.microsoft.com/en-us/library/aa384129(v=vs.85).aspx

summerallAuthor
Participant
June 28, 2011

That's a huge help, thank you!

Chris Cox
Legend
June 28, 2011

The Program Files location is also dictated by Microsoft.