Notifications
Clear all

[Closed] CreateOLEObject: Controlling which bit version of photoshop is launched

Using the following code in maxscript launches Photoshop:

pshop=CreateOLEObject "Photoshop.Application"  -- Open Photoshop
   pshop.Visible=true
My question is what controls the Photoshop bit version to open?

I've done a test:
  1. Multiple machines are all running 3dsmax 32bit on a 64bit machine.

  2. On each machine Photoshop 32 & 64 bit are installed.

  3. The above code is executed and:

    • Several machines open 64bit Photoshop.
    • Others open 32bit photoshop.

    A machine that opens a particular bit version will never change – its consistent every time – even after a reboot.

    I realize that this may be beyond the scope of this forum and may be more of a ole/com issue – but any insight would be appreciated.

    Also: This link appears to indicate that the launching application’s bit version should control the bit version of the comobject – but that is not the experience I’m having:
    http://forums.adobe.com/message/3336412#3336412

    Thanks,

    J.

3 Replies

You could probably just use HiddenDosCommand as well and Launch the proper version of PS that way possibly?

Get the Users Main Drive through Maxscript or Dos, then assume their PS Install Directory or have them choose it?

1 Reply
(@jsnb)
Joined: 11 months ago

Posts: 0

I’m sending subsequent javascript commands over COM to Photoshop. The information is gathered from the 3dsmax session and user input – which all works, but I cannot predict which bit version of photoshop will open.

This is a problem in cases where, for example, the artist has setup custom Photoshop settings and expects to interact with Photoshop only to recognize that their layout or keyboard shortcuts appear incorrect. In fact they have not been touched, but the wrong bit version has loaded.

This page appears to explain how a 32bit program could access a 32/64bit registry – but I’m not 100% sure how I can get it to help my particular problem in maxscript:

http://msdn.microsoft.com/en-us/library/aa384129(v=vs.85).aspx

There no any com switch to target the connection to 32 or 64 bit version,
as you create ole object in Max x32 it should connect to PS x32 (only)
and the same for x64 – Max x64 should connect to PS x64.

I know that this not solve your issue but it is so odd…
so I’m almost sure that no one could helps.