Detect whether PS is 32bit or 64bit

Anyone, especially newbies, asking for help with Photoshop Scripting and Photoshop Automation - as opposed to those contributing to discussion about an aspect of Photoshop Scripting

Moderators: xbytor, DavideBarranca, Paul MR


Detect whether PS is 32bit or 64bit

Postby undavide » Sun Apr 20, 2014 7:02 pm

is there a way to know whether the running Photoshop is 32 or 64bits (on Windows)?
Only thing that came to my mind is to parse app.systemInformation, which is a long, long string like:

Code: Select all
Adobe Photoshop Version: 14.2.1 (14.2.1 20140207.r.570 2014/02/07:23:00:00) x64
Operating System: Mac OS 10.9.2
System architecture: Intel CPU Family:6, Model:23, Stepping:10 with MMX, SSE Integer, SSE FP, SSE2, SSE3, SSE4.1
Physical processor count: 2
Processor speed: 3060 MHz

get to the index of the first "x" and read the next 2 chars.

Code: Select all
app.systemInformation.substr (app.systemInformation.indexOf('x') +1 , 2));

Is there any other, faster way than retrieving the entire string (about 23.000 chars in my case)?
Thank you!

Davide Barranca


Detect whether PS is 32bit or 64bit

Postby pedromarques » Thu Apr 24, 2014 12:09 pm

If you want it from a adobe script, you can use this reading any adobe app installed 'bridge', 'estoolkit', 'exman', 'flashbuilder', 'photoshop', 'switchboard', etc

// Getting the photoshop bit version:
if (BridgeTalk.isRunning('photoshop')) { // if photoshop is open, brings it to front

// other utilities:
$.writeln(BridgeTalk.getTargets ('60.064')); // Result: photoshop-60.064 only if it exists
$.writeln("Apps intalled:\n > "+BridgeTalk.getTargets (null).join("\n > ")); // Result: get all adobe installed app+versions on present computer
// Specify a negative value to return all versions up to the absolute value of the version number, For example:
$.writeln("Apps intalled:\n > "+BridgeTalk.getTargets ('-5.5').join("\n > ")); // Result: get all adobe app+versions lower then 5.5 installed on present computer

$.writeln(BridgeTalk.getSpecifier ('photoshop')); // Result, for example: photoshop-60.064

$.writeln(BridgeTalk.getAppPath('photoshop')); // Result: C:\Program Files\Adobe\Adobe Photoshop CS6 (64 Bit)\Photoshop.exe
$.writeln(BridgeTalk.getDisplayName('photoshop')); // Result: Adobe Photoshop CS6 (64 bit)

if (BridgeTalk.isRunning('photoshop')) { // if photoshop is open, brings it to front

//~ // BridgeTalk.getStatus Results:
//~ // BUSY: The application is currently busy, but not processing messages. This is the case, for example, when a modal dialog is shown.
//~ // IDLE: The application is currently idle, but processes messages regularly.
//~ // PUMPING: The application is currently processing messages.
//~ // ISNOTRUNNING: The application is installed but not running.
//~ // ISNOTINSTALLED: The application is not installed.
//~ // UNDEFINED: The application is running but not responding to ping requests. This can be true of a CS2 application that uses an earlier version of the messaging framework.

Posts: 1
Joined: Thu Jan 19, 2017 6:45 pm

Re: Detect whether PS is 32bit or 64bit

Postby geeklystrips » Thu Jan 19, 2017 6:50 pm

Hello Davide!
This an old thread, I'm assuming you found the answer -- but just in case, this is what I use.

Code: Select all

var is64bits = BridgeTalk.appVersion.match(/\d\d$/) == '64';

On a related note, how would you differentiate between Windows versions without parsing app.systemInformation?
$.os returns "Windows 7" on both Win 7 and Win 10.
Hmm. Or should I just look for 6.1 vs 6.2? I feel like this is making too many assumptions.

Code: Select all

var isWin7 = $.os.match(/windows/i) == "Windows" ? $.os.match(" 6.1 Service Pack ") != null : false;
var isWin10 = $.os.match(/windows/i) == "Windows" ? $.os.match(" 6.2 Service Pack ") != null : false;

(Windows 8 is not a concern of mine)

Return to “Help Me”

Who is online

Users browsing this forum: No registered users and 2 guests