Hi, everyone!

I am using Interop.Photoshop.Dll from my C# Windows Forms application. I am using a com object that Adobe Photoshop CS4 provides to use Photoshop in my C# program.

I'm using the ApplicationClass class to launch Photoshop. I have Photosoft CS3 and CS4 on my machine. When I do this:

Photoshop.ApplicationClass app = new Photoshop.ApplicationClass()

It launches Photoshop CS3 and does not launch CS4. Is there someone who knows the cause of this?

P.S: I checked my registry at // HKEY_CLASSES_ROOT\Photoshop.AdobePlugin\shell\open\command and it points to the Photoshop CS4 executable.

Recommended Answers

All 5 Replies

Why don't you call Process.Start() instead of using their interop for opening it? If all you're doing is executing it then just start the process.

Unfortunately, I can't call Process.Start() because I will need to get the opened images in Photoshop in my code. So, I need a "pointer" on the application and ApplicationClass can provide it to me.

Zip all of the assemblies Photoshop ships (the interop and related assemblies) so I can take a look at them. This might be a %PATH% issues for installed versions

Unfortunately, I cannot send you the assemblies because of the security policies of where I work.

I tried to add the directory path of the Photoshop CS4 executable to the %PATH% variable (because it wasn't here), but it didn't work.

Maybe I will try to uninstall CS3 and see if the ApplicationClass constructor launches CS4, but it is not an acceptable workaround for the user of my program. Any other ideas?

I was going to decompile the assembly and look how it was determining which application to launch, and how you could change it. I guess you could do that yourself.


Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.