7 Replies Latest reply on Oct 5, 2010 5:06 PM by Tom Ruark

    COM Problem windows7 & Photoshop CS5




      I am having a bit of a problem with instancing com objects for both photoshop x64 and x32 versions. both of which I have installed, and need available, due to legacy 32 bit plugins our studio relies upon for certain things.


      The problem is that there seems to be only entries for the 64 bit version of CS5 in the registry.


      Looking at the objects available in HKEY_CLASSES_ROOT I have






      if I trace back the CLSID to  HKEY_CLASSES_ROOT\CLSID\{xxx-xxx-....}\LocalServer32 this points to "C:\Program Files\Adobe\Adobe Photoshop CS5 (64 Bit)\Photoshop.exe /Automation" for all of them. This is the same for each of the other objects such as Photoshop.JPEGSaveOptions etc..

      all set the LocalServer32 to the 64 bit version. How can I get entries for the 32 bit version aswell?


      I am guessing it might be possible to itterate all Photoshop.X entries in the registry and create new versions with new clsids that have the LocalServer32 set to the 32 bit version of photoshop?


      Any help appriciated



        • 1. Re: COM Problem windows7 & Photoshop CS5
          rmawatson Level 1

          I should note that when I CreateObject("Photoshop.Application") with x32 photoshop open I get the error


          Code : 800A01AD


          "ActiveX component can't create object"


          although it does bring to front photoshop, and this error is dealyed by about 10 seconds.


          if I have no photoshop open, I get the x64 version started, and I get no problems with the 64 bit version


          perhaps there is a need for Photoshop.Application.12.x32 or simialr ?

          • 2. Re: COM Problem windows7 & Photoshop CS5

            Will anyone from Adobe answer this?  I thought techs are suppose to be monitoring the forums, and this problem is very valid...  Now for me as well.


            I have this exact same problem in reverse.  I have a script that runs Photoshop CS5 x32 perfectly, but when I have PS x64 open and run the script, the code hangs for 10 seconds and then displays the same 800A01AD error on the CreateObject("Photoshop.Application") statement.


            I would like my scripts to be able to run under x64, to take advantage of the larger memory space.  I'm using 32 bit Visual Basic, and I'm not confident that this would work better if I was running the scripts from a 64 bit host application.


            Today I talked to "John" at Adobe tech support.  He obviously had no grasp of what a script even was.  After being on hold for 25 minutes, he told me he had no solution, but that he posted the question on the forums for a real tech to answer.  I cannot find that post, so I figured I'd add my voice to this most applicable one.


            Thank you.

            • 3. Re: COM Problem windows7 & Photoshop CS5
              George E Smith

              Script Listener generated code does not work when you are using Win 7 64 bit and Visual Studio 2008/2010. It will not work with either the 32 bit or the 64 bit version of Photoshop on Win 7 64 bit.


              It does work (for me at least) when you are using Win 7 32 bit and the 32 bit version of Photoshop CS5.


              This is a significant difference from CS4 and earlier versions of Photoshop.


              I have been writing Visual Studio / Photoshop scripting programs since Photoshop CS and earlier.




              George Smith

              • 4. Re: COM Problem windows7 & Photoshop CS5
                markerb Level 1



                You seem to talking about the code generated from Script Listener, but neither rmawatson and I mentioned that product.  I believe we were both talking about  more general Photoshop scripting from within our own applications.


                Since the original poster is able to run 64 bit scripting, I'm guess what you've written above does not apply to the broader concept of 32 vs 64 bit scripting.




                • 5. Re: COM Problem windows7 & Photoshop CS5
                  George E Smith Level 1

                  Yes, as I mentioned in my first reply I was talking about script listener generated code.


                  As to the issue of creating scripts that run on either 32 bit or 64 bit Photoshop. The only way I have found around this problem is to have two systems, one running Win 7 32 bit and the other running Win 7 64 bit. I have to compile my programs (again I use Visual Studio 2008) on each system and then distribute each as a different version of the program.




                  George Smith

                  • 6. Re: COM Problem windows7 & Photoshop CS5
                    markerb Level 1

                    Wow, that's pretty inconceivable that one cannot develop 32 bit scripts on a 64 bit OS.


                    WoW64, indeed.  ;}

                    • 7. Re: COM Problem windows7 & Photoshop CS5
                      Tom Ruark Adobe Employee

                      Wow for sure! Here is some experiments I do to see what is going on. This is on a 64 bit windows 7 machine. I run as admistrator and with that annoying "are you sure you want to run the thing you just tried to run" OFF. User Access Control (UAC) I think is the official name.


                      I open up a command prompt, cmd.exe, in 64 bit mode. Window-R "cmd" (I haven't tried this with a 32 bit cmd prompt (H:\Windows\SysWOW64\cmd.exe).


                      Go to where the Sample Scripts are, doesn't matter wich version as the vbs files are the same. Mine is here:


                      H:\Program Files\Adobe\Adobe Photoshop CS5 (64 Bit)\Scripting\Sample Scripts\VBScript


                      Make sure no photoshop is running and type in:


                      cscript Trim.vbs


                      Wait for the script to complete but do not hit the "ok" yet on the script.


                      Launch windows task manager and note that both Photoshop (you can tell when the splash screen launches as well) and csript are in 64 bit mode.


                      Now hit ok and quit Photoshop, wait for them both to be gone from task manager and type in:


                      \Windows\SysWOW64\cscript Trim.vbs


                      Now you see that both Photoshop and cscript are in 32 bit mode.


                      Now trying to "cross the wires" does not work.


                      Launch 64 bit photoshop first, then try to run the 32 bit script. You see that 32 bit won't launch, we block both 32 and 64 bit running at the same time, and the cscript will time out. Doing the 32 bit Ps and 64 bit cscript will cause the same problem.


                      Hope that helps you and you could be a way that you control which version of Photoshop gets launched for your case. I thought I read somewhere that you could talk from a 32 bit to a 64 bit via VBScript (OLE Automation) (Automation) but never could find or build a real example.