Monday, March 22, 2010

Location of plug-ins directory

I'm a plug-in developer and currently use the following registry entry to find the location of Photoshop plug-ins:



HKEY_LOCAL_MACHINE/SOFTWARE/Adobe/Photoshop/...



This gives me the location of the plug-ins folder. I have a few questions.



Is there a way to find the name of the Filters subdirectory. Note that it's not always ''Filters''. In French, for example, it's ''Filtres''.



Is this a valid technique. Or, put another way, will CS3 and Lightroom place similar entries in the registry? Or should I be gathering this information in a different way?
Location of plug-ins directory
I have run into a similar issue: the file format plug-in directory on German systems is ../Photoshop/Zusatzmodule/Dateiformat/



Adobe needs to provide a way to find the localized names of the directories so that we can determine where to install the plug-in. Perhaps this already exists, but I haven't seen anything like this in the SDKs.
Location of plug-ins directory
In french the directories are as follows:



Filters: ''Adobe Photoshop CS3\Modules externes\Filtres''

Automations: ''Adobe Photoshop CS3\Modules externes\Automatisation''

Import/export: ''Adobe Photoshop CS3\Modules externes\Importation-Exportation''



Is it possible to get this info from PS registry keys? It is not a good idea to hard code the pathes in the plug-in installer...



Thanks



Chaker

Enumerate each Photoshop product by scanning registry entries in:

HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\Photoshop



Within each of those registry keys, the base plugin folder is the default

entry in the PluginPath key.



Note: the Photoshop installer also saves the same folder name in the

PluginPath registry *value* under the per product key. This value contains

the same pathname, and is absent for Elements installations. If you will

also be installing under Elements, use the key for uniformity.



I have not been able to find a reference for naming the folders inside the

plugin folder, but these names do not seem to matter. I use ''Filters'' for

the folder name, and this works even on non-English systems. The same may

be true of automation and Import-Export.

Thanks a lot Curvemeister. I'll try this out immediately!

* You're right, the folder names inside the plugin forder do not matter. you can create your own directory in the plugin dir and put your files there, it will work perfectly.



* I can find the registry path you gave: HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\Photoshop but the key PluginPath isn't there, at least for CS3. I found it under HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\Photoshop\10.0

I guess the installer should detect the versions available undder HKLM\SOFTWARE\Adobe\Photoshop and then ask the user for which version it should install the plugin (if more than one version is supported).



I do not have CS2 installed. Does it put the PluginPath key under HKLM\SOFTWARE\Adobe\Photoshop\9.0 or directly under HKLM\SOFTWARE\Adobe\Photoshop?



Thank you in advance!

The registry key PluginPath contains a wrong value on my install! it is set to C:\Program Files\Adobe\Adobe Photoshop CS3\Plug-Ins\ on my machine, which is correct for the English version but not for my French install! Using this dir makes my plugin not to work.



Curvemeister: Did you try this registry key on localized installs?



Thank you

On Sun, 12 Oct 2008 02:50:15 -0700, Chaker_Nakhli@adobeforums.com wrote:



%26gt; * You're right, the folder names inside the plugin forder do not matter.

%26gt; you can create your own directory in the plugin dir and put your files

%26gt; there, it will work perfectly.



This happens occasionally.



%26gt; * I can find the registry path you gave:

%26gt; HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\Photoshop but the key PluginPath isn't

%26gt; there, at least for CS3. I found it

%26gt; under HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\Photoshop\10.0 I guess the

%26gt; installer should detect the versions available undder

%26gt; HKLM\SOFTWARE\Adobe\Photoshop and then ask the user for which version

%26gt; it should install the plugin (if more than one version is supported).



Yes, this is exactly what is required. Enumerate the keys in the Photoshop

folder - there is one for each installed version of Photoshop. There is a

similar key for Elements.



%26gt; I do not have CS2 installed. Does it put the PluginPath key under

%26gt; HKLM\SOFTWARE\Adobe\Photoshop\9.0 or directly under

%26gt; HKLM\SOFTWARE\Adobe\Photoshop?



Under the 9.0 key there will be another key called PluginPath. The default

value - with a blank name - for that key is the pathname.



%26gt; The registry key PluginPath contains a wrong value on my install! it

%26gt; is set to C:\Program Files\Adobe\Adobe Photoshop CS3\Plug-Ins\ on my

%26gt; machine, which is correct for the English version but not for my French

%26gt; install! Using this dir makes my plugin not to work.



I don't have an explanation, but I do have one guess. Is it possible that

at some point you installed an English version of Photoshop - for example a

tryout version?



%26gt; Curvemeister: Did you try this registry key on localized installs?



Yes, my product is used in dozens of countries. It is certainly possible

that I'm using the wrong keys - I can only tell you about what I have used

and what seems to work. I don't know about any official documentation for

this. Perhaps someone else has something to say about this.

I have seen a few cases, especially on German installations, where Adobe had the wrong entry in the registry. I do an MSI install that runs an executable, after installation, to copy the plug-in to the appropriate place. If it finds an entry in the registry, but no corresponding directory, it displays a warning that the plug-in was not installed. I also include instructions for manual installation.



For the Filters directory I check for Filters (English) Filter (German) and Filtres (French). If none of the above, but there is a Plug-ins directory, I simply install under it.



Things get more interesting on Vista-64. There you have to check for 32-bit Photoshop and 64-bit Photoshop and install an appropriate plug-in in the appropriate place. We'll all know more about this in a few days.
  • lips
  • No comments:

    Post a Comment