5 Replies Latest reply on Apr 3, 2012 8:17 AM by Carl Sun

    Various problems using extension manager with command line

    ilvar Level 3

      Hello all,


      We are installing our plugins  to CS4/5/5.1 version of Adobe Photoshop as part of our installer and  allow the users to select specific versions of Photoshop to install the  panel for. There are a few old problems that I wanted to rant about for  quite some while and now with a whole bunch of problems that the 5.1  update introduced I feel I just have to voice them. I will limit it to  PC only as it seems to be the most troubled platform


      #1 As we cannot install our plugin only by using the  Extension Manager (simply because it cannot handle all we've to do upon  the installation) we have to run commands from within the our installer,  non-interactively, of course.

      The interface to command line installation is xmancommand.exe (or "Extension manager (Version). exe" - not sure whether it makes any difference. ). Now the first question is how to find this executable on   the target machine, from an installer. Users may specify different  locations to install the Creative Suite and it certainly does NOT have  to  be  C:\Program Files\...(or %PRGRAMFILES% in general). ATM we are using an odd place in the registry  to to find the path to the most recent Extension Manager but first its  sometimes overwritten by another installation and in any case it  only shows ONE version of the extension manager which of course cannot  handle other versions (see #2)


      #2 Why the most recent version of  Adobe Extension Manager (5.5) cannot install the extension for 5.0?  Well, install it actually does, however its disabled for CS5 and it  seems that the only way to enable it on this platform is to find  previous (CS5) extension manager and to enable it. Oh, actually no - it  doesn't work! The only way that I found here working is to find CS5  extension manager first, install the extension there and then use CS5.5  extension manager to enable it. Why do I need both utilities to manage  my extensions?!


      #3 The program is severely lacking in  documentation AND it doesn't produce reasonable output messages, so  determining what it can actually support is a puzzle. For example, why  "Dreamweaver CS5" is a correct product name and "Photoshop CS5" is not (don't different teams talk to each other)? Ok, lets forget the consistency, but how do I make the utility output the list of all products it supports, in their  magic token form that it will actually be understood if passed in in the  command line? By trial and error? This menthod btw is also extremely painful: nany times when  specifying wrong parameters the program doesn't provide any output and just shrugs "whatever, go figure it yourself"...


      #4 Why the only way to enable/disable an extension in Photoshop  seems to be using magic "productfamily" keyword that is not even listed  on Adobe's help page for command line options (here:  http://help.adobe.com/en_US/extensionmanager/cs/using/WSB4845EDD-14E5-476a-B749-FF328830D1 4F.html).?  E.g. "xmancommand.exe" -suppress -remove  product=Photoshop  extension=OurExtension" will ALWAYS fail with a lovely "'Photoshop is  not supported by Extension Manager CS5.5." error; I've tried "PhotoshopCS5", "Photoshop CS5", "PhotoshopCS5.1"  "Photoshop CS5.1", "Photoshop-12" (mentioned in examples section in  http://help.adobe.com/en_US/extensionmanager/cs/using/packaging_extension.pdf )  and a whole bunch of other permutations - none  seem to work (see #3). Magic "productfamily=Photoshop" does work. But  then it only aims the current version ("CS5.1") and I need it to work  for CS5 (I'm not even mentioning CS4...."). Would there be any suggestions?


      Really, the question is, how do we, third-party developers, are  supposed to interact with the command-line utility without knowing where  it is, what product names is capable to work with and without being  able to target specific platforms (i86 vs x64 anyone  (http://forums.adobe.com/thread/672537)? CS5 vs CS5.1 (above)?). I don't  know what your test cases are for the command line tool (if any!), but this is simply insane, folks, simply  insane.

        • 1. Re: Various problems using extension manager with command line
          Carl Sun Level 4

          I am sorry for the poor documentation of Extension Manager which causes you so much trouble.

          1. You can use BridgeTalk API to ask specific version of Extension Manager to do something. There is sample in packaging_extension.pdf about this. You don't need to know the installation path of Extension Manager. One thing to note is that the value of bt.target is version specific, i.e. "exman-5.0", "exman-5.5" send this message to different version of Extension Manager, so you can change this value to install/enable/disable/remove extensions using different version of Extension Manager. More detailed documentation of BridgeTalk can be found by clicking "Help" menu then clicking "Javascript Tools Guide CS5" in "Adobe ExtendScript Toolkit CS5".

          2. Specific version of Extension Manager only manage extensions for corresponding version of product. You should use Extension Manager CS5 to install extensions for Photoshop CS5. The reason that the extension you installed for Photoshop CS5.1 using Extension Manager CS5.5 is displayed for Photoshop CS5 in Extension Manager CS5 is that two versions of Photoshop specified the same directory for Extension Manager to manage extensions. This is a defect and will cause some problems if multiple versions of Photoshop co-existed in one machine. But "to find  previous (CS5) extension manager and to enable it" should work for you, I guess you use command line to enable it and specify wrong product name (see #3) so that it doesn't work.

          3. When using command line, you should specify "product" attribute with the name displayed at the left panel of Extension Manager. So "Photoshop CS5 32" is correct. Remember to enclose it with double quote because of existence of space character.

          4. As above mentioned, use display name of Photoshop, and call proper version of Extension Manager by BridgeTalk.

          • 2. Re: Various problems using extension manager with command line
            ilvar Level 3

            Hello Carl,

            It has been a while, however as we are gearing up for the next release, I'm looking again at the alternatives to CLI which as I've said has a lot of serious drawbacks.


            I do appreciate your suggestion about BridgeTalk, however to actually talk to BridgeTalk one has to use the ExtendScript Toolkit, I presume. Its pretty easy to do it interactively, however the question is how can I actually ran ExtendScript Toolkit in a batch mode that would talk to BridgeTalk without showing the ExtendScript Toolkit's (or Bridge or Photoshop's or anything else) GUI, as all this must happen "hiddenly" within the installer. I understand its probably quite a silly question but obviously I'm not a big BridgeTalk scripting expert and I surprisingly don't really seem to be able to find the answer elsewhere..

            • 3. Re: Various problems using extension manager with command line
              Carl Sun Level 4

              You can run script in batch mode without ExtendScript Tookit UI. Save the code which you normally input in the source window of ExtendScript Toolkit to a jsx file (plain text file with ".jsx" extension). Then run command as follows:

              "C:\Program Files (x86)\Adobe\Adobe Utilities - CS5.5\ExtendScript Toolkit CS5.5\ExtendScript Toolkit.exe" –cmd yourscript.jsx

              The installation location of "ExtendScript Toolkit.exe" is fixed, no matter where users install Creative Suite.


              But I suggest you use another way.

              1. Save the following code to a jsx file (e.g. diag.jsx):

              resultFile = new File("D:/result.log");




              2. In batch file, write something like:

              if exists "C:\Program Files (x86)\Adobe\Adobe Utilities - CS5.5\ExtendScript Toolkit CS5.5\ExtendScript Toolkit.exe"

                  "C:\Program Files (x86)\Adobe\Adobe Utilities - CS5.5\ExtendScript Toolkit CS5.5\ExtendScript Toolkit.exe" -cmd diag.jsx

              else if exists "C:\Program Files (x86)\Adobe\Adobe Utilities - CS5\ExtendScript Toolkit CS5\ExtendScript Toolkit.exe"

                  "C:\Program Files (x86)\Adobe\Adobe Utilities - CS5\ExtendScript Toolkit CS5\ExtendScript Toolkit.exe" -cmd diag.jsx

              3. Write script to extract full path of all installed versions of Extension Manager executable from "D:\result.log". No matter which version of ESTK is called to run this jsx file, all versions of Extension Manager will be listed.

              4. Use CLI to run your command. Such as "D:\Adobe\Adobe Extension Manager CS5.5\Adobe Extension Manager CS5.5.exe" -suppress -install ...


              If your command requires administrative previlege, please make sure you open "Command Prompt" as administrator (Windows) or use sudo in Terminal(Mac). Otherwise the command in suppress mode will fail silently.

              1 person found this helpful
              • 4. Re: Various problems using extension manager with command line
                ilvar Level 3

                Thanks a lot for your suggestion, Carl. I'll probably have to write some sort of an auxillary utility to parse the diagnozis file, but it seems this approach should work. Can I count on the fact that the Toolkit is always installed, for each version of Photoshop or Illustrator, be they stand-alone or as a part of a collection, from CS5 on? Will the path always be $PROGRAMFILES32\Adobe\Adobe Utilities - CS5.5\ExtendScript Toolkit CS5.5, even on localized systems?

                • 5. Re: Various problems using extension manager with command line
                  Carl Sun Level 4

                  ESTK is an optional component of Photoshop, Illustrator standalone installer and Creative Suite installer. It is checked at default. So most of users will have ESTK installed. But of course some of users are likely to uncheck it. The path should be the same on localized systems. I will double check it when I go to work the day after tomorrow.


                  Another way to find the installation directory of Extension Manager is to read pdb database. It is a SQLite database and is created after Adobe products are installed.

                  The database location is:

                  windows x86:

                  %HOMEDRIVE%\Program Files\Common Files\Adobe\caps\pdb.db

                  windows x64:

                  %HOMEDRIVE%\Program Files (x86)\Common Files\Adobe\caps\pdb.db


                  /Library/Application Support/Adobe/caps/pdb.db


                  SQL statements to find install info:


                  select payloadId from payloads where productName='Adobe Extension Manager CS5.5';

                  The query result is somthing like {347D0632-0D1B-4815-A308-AE039EDD6802}

                  Then run the following sql:

                  select * from payload_data where payloadId='{347D0632-0D1B-4815-A308-AE039EDD6802}';


                  After that you can use command line to call Extension Manager.