• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

COM Reference in CS5 Missing

New Here ,
May 25, 2010 May 25, 2010

Copy link to clipboard

Copied

Does any body know what happened to the COM reference in visual studio 2008 for photoshop CS5, i just installed and my CS4 COM vanished and now there is no COM reference for photoshop CS5.

TOPICS
Actions and scripting

Views

25.7K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Explorer ,
Jul 19, 2010 Jul 19, 2010

Copy link to clipboard

Copied

I assume you are using Microsoft Visual Studio's VB or CSharp to program against Photoshop. If so, you simply add a reference to the Interop.Photoshop.dll. Then in VB, for example, you can do something link

Dim PS As New Photoshop.Application

Dim doc As Photoshop.Document

doc = PS.Open(Me.OpenFileDialog1.FileName)

etc.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 19, 2010 Jul 19, 2010

Copy link to clipboard

Copied

No, that's OK, I understood this part (I had done a similar thing with CS3). What I meant, was that I am unable to access to your linked files, on the Microsoft web site.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 19, 2010 Jul 19, 2010

Copy link to clipboard

Copied

Then I will attach them to this message.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 20, 2010 Jul 20, 2010

Copy link to clipboard

Copied

Sorry to bother you again. Could you please, send the file at :

nico.bigeard@gmail.com ?

Thank you.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 01, 2011 Nov 01, 2011

Copy link to clipboard

Copied

Hello,

I have no trouble using this VB.NET code pattern in Visual Studio 2010 to instatiate InDesign.CS4 (6.0.6).  But with InDesign.CS5 the reference returned by CreateObject() generates a runtime error.  Has anyone encountered this?

Sincerely,

Len Russell

Principal Developer

Case Parts Company

lennyr@casepart.com

Public Class Form1

Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click

        Dim app As InDesign.Application

        Dim docs As InDesign.Documents

        app = CreateObject("InDesign.Application.CS5")

        docs = app.Documents

    End Sub

End Class

InvalidCastException was unhandled

Unable to cast COM object of type 'System.__ComObject' to interface type

'InDesign.Application'. This operation failed because the QueryInterface call

on the COM component for the interface with IID '{ABD4CBB2-0CFE-11D1-801D-0060B03C02E4}'

failed due to the following error:

No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Nov 01, 2011 Nov 01, 2011

Copy link to clipboard

Copied

I would try posting your question to the InDesign forum. You are in the Photoshop forum. Looks like you have some registry entries wrong. Not sure if a reinstall would help of InDesign or not.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Nov 02, 2011 Nov 02, 2011

Copy link to clipboard

Copied

Try running InDesign as Administrator just once to see if that corrects the registry entries. This is what we have to do with Photoshop to be able to use COM. (Windows 7)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 23, 2010 Aug 23, 2010

Copy link to clipboard

Copied

Was wondering if anyone found any other way to get around this issue?

I didn't have any luck using previous built versions of the dll, my application just hangs when I try to create a COM photoshop instance.

If Adobe has replied that they don't intend to allow COM interop anymore, I'd like to know, because it is a fairly important part of our toolchain, and it will be quite some work to find an alternative solution, and it has really been a god send for automation.

I'd be happy to register the components myself, etc, if someone has found a way to do so!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 23, 2010 Aug 23, 2010

Copy link to clipboard

Copied

Sorry, I didnt post what i found, i did get contacted by a support tech from adobe but he gave me no information, just asked for what i had found. but anyway it looks like its all in the installer i have several different version cs4 design premium, cs5 design premium, cs4 master, cs5 master,cs5 web and they all seem to do a little differently my cs4 master collection does install all COM references cs5 design does not install all only illustrator COM. thats all i got so maybe pickup a different install and see if it works the compiled installs may be different i dont know its all so stressful, i will now have a bubble bath and then reclaim my manhood by eating pounds of MEAT.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Aug 24, 2010 Aug 24, 2010

Copy link to clipboard

Copied

Hi,

Can you try running one of the sample VB scripts from the Scripting directory: c:\Program Files\Adobe\Adobe Photoshop CS5\Scripting\Sample Scripts\VBScript\

See if that corrects the bad path in a registry key.

thx,

steve

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 24, 2010 Aug 24, 2010

Copy link to clipboard

Copied

I ran the OpenDocument.vbs, and it opened the document in the LayerComps.psd document. But what does this prove?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Aug 24, 2010 Aug 24, 2010

Copy link to clipboard

Copied

Hi,

On my XP SP3, I didn't see the Ps Object Library in COM before running the sample script. But after running the ApplyStyle.vbs and then launching VS 2008, I do see the Object library available.

I'm trying to find if this simple workaround corrects what appears to be an installer problem.

thx,

steve

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 24, 2010 Aug 24, 2010

Copy link to clipboard

Copied

I think you are on to something. I now have Adobe Photoshop CS5 Object Library showing up in the available COM references in Visual Studio 2010. That was not the case before I ran one of the sample VB scripts in the scripting folder.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Aug 24, 2010 Aug 24, 2010

Copy link to clipboard

Copied

Thanks for reporting back, William.

Do you run with an admin account or standard user account? And do you have UAC turned on with your Win7 machine?

thx,

steve

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 24, 2010 Aug 24, 2010

Copy link to clipboard

Copied

I did your test on my desktop XP computer. Would you like me to do the same on my Win 7 laptop? On the Win 7 laptop I run as an administrator, and I think UAC is turned on.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Aug 24, 2010 Aug 24, 2010

Copy link to clipboard

Copied

I would really appreciate if you could try it on your Win7 laptop. UAC is new to Vista and above, so having another data point outside of XP would be good.

thx,

steve

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 24, 2010 Aug 24, 2010

Copy link to clipboard

Copied

I may have misstated earlier. Perhaps I already had the COM references showing on my desktop in Visual Studio and did not recall it. I unfortunately did not look before running the VBS scrip, only after. Because I just did the same thing on the Win 7 laptop, and it did not cause the com references to become available there.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 24, 2010 Aug 24, 2010

Copy link to clipboard

Copied

Thanks for looking into this further!

I've tried running a few of the VB scripts, and then looking for the COM references again, but no luck I'm afraid.

Some details on what I'm running, and have installed, etc:

Vista 32 (UAC enabled)

Photoshop CS4 Extended and CS5 Extended installed.

MS Visual C# 2010 and 2008 installed.

Cheers,

Geoff Lester

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Aug 24, 2010 Aug 24, 2010

Copy link to clipboard

Copied

Hi William & Geoff,

Can you try turning UAC off, and see if that makes a difference?

thx,

steve

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 25, 2010 Aug 25, 2010

Copy link to clipboard

Copied

Turning off UAC on the Windows 7 laptop (then restarting Windows 7) and then running the OpenDocument.vbs script in my Photoshop CS5 Sample Scripts folder had the desired result. Now when I open a project in Visual Studio 2010 and look and the available COM references, the Adobe Photoshop CS5 object Library and CS5 Type Library are now available.

I should note that after clicking on the OpenDocument.vbs and Photoshop opened, it took a very long time before the test document actually opened, which was not the case when I had earlier tried it with UAC on. However, it turned out that another program was doing an update in the background, so this may have been what slowed things down and had nothing to do with whatever Photoshop may have been doing.

I also wonder why, since I received no message about changes when I had the UAC turned on, it would it have prevented the COM components being created.

Anyway, you have apparently discovered a way to have the COM Interop dlls generated.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Aug 25, 2010 Aug 25, 2010

Copy link to clipboard

Copied

Hi William,

Yes, it looks like Ps has a problem correcting bad paths in the registry if UAC is enabled and/or the application is not executed with elevated priviledges. I have been looking at XP and Win7 32 bit for it's behavior. I still need to look at bit more at what the 64 bit OS does in these conditions.

So for the near term, it appears with Win 32 bit OSes that launching Ps using contextual menu option 'Run as administrator' will correct a bad registry key path (even with UAC on; this assumes user access to an administrator  account on the machine.). With the path fixed, the COM reference for Ps should appear.

We/Adobe still need to find which installers are setting the path incorrectly and get that sorted out.

thx for helping me test and confirm these findings!

regards,

steve

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 25, 2010 Aug 25, 2010

Copy link to clipboard

Copied

By the way, The win 7 I did this on was 64-bit

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Aug 25, 2010 Aug 25, 2010

Copy link to clipboard

Copied

Hi Geoff,

If you haven't already tried turning UAC off, there's a quicker way to workaround the problem.

Launch Ps with 'Run as administrator'. I haven't tried this with CS4 yet, but I bet the same silent failure is happening for each version. You should only need to do this once to get the path corrected. If you uninstall/reinstall the problem may appear again depending on the installer package.

thx,

steve

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 25, 2010 Aug 25, 2010

Copy link to clipboard

Copied

Hi Steve,

Thanks very much, that worked perfectly! That must have been a fun one to track down

Cheers,

Geoff Lester

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines