Open Application in 32bit mode for all users.

taugust04
Valued Contributor

Hi everyone,

I'm being forced to deploy SilverFast scanning software in our Graphics and Photography labs. Due to Epson not providing 64bit drivers for most of their scanner models, Silverfast needs to be opened in 32-bit mode when connected to the Epson scanners we have. Is there a way I can script this or configure this system-wide using Casper. The right-click, get-info, checkbox "Open in 32-bit mode" method is not going to cut it in our academic labs.

Thanks!

~Ted

1 ACCEPTED SOLUTION

tkimpton
Valued Contributor II

i give you my secret. I lost hair over this in the past.

An example by setting Firefox to 32bit by default

#!/bin/bash

# Check to see if Firefox exists
if
ls -la /Applications/Firefox.app/Contents/Resources

then

# Set the architecture preference order to 32-bit first
defaults write /Applications/Firefox.app/Contents/Info "LSArchitecturePriority" '(i386, "x86_64")'

# Making sure the permissions on the Info.plist are correct
chmod -R 775 /Applications/Firefox.app/

else
echo "Firefox is not installed"

fi

View solution in original post

13 REPLIES 13

mm2270
Legendary Contributor III

I recall needing to do something like this some years ago because of a Safari browser plug-in at the time. I was never able to find a command that would programmatically set Safari to open in 32-bit mode. There may not be a way.
But, it can be scripted I think. I can't be 100% certain this will work, but try-

arch -i386 /Applications/AppName.app/Contents/MacOS/AppName

I believe that makes the app open in 32-bit mode. But how you'd use that I'm not sure. Maybe place it in Self Service for your graphics department as an ongoing policy and plop that in the Run Command field?

Hope that helps.

rmanly
Contributor III

You can push out ~/Library/Preferences/com.apple.LaunchServices.plist.

I did that a few years ago when the Xerox accounting features only worked in apps in 32-bit mode. Put it in the User Template and filled existing users.

Start with a fresh user / system and then set what you want to be 32-bit and copy it in to Composer.

acdesigntech
Contributor II

If you dont mind overwriting the existing launchservices plist, sure oh and at least for safari, this is hardware dependent, so different models will have slightly different plists... But for a cleaner solution, you can write the necessary entries into the launchservices plist. I wrote about doing this with safari, but was never able to get <data> to format properly: http://acdesigntech.wordpress.com/2011/10/01/editing-com-apple-launchservices-plist-to-open-safari-i...

Maybe we can finally get this working...

tkimpton
Valued Contributor II

i give you my secret. I lost hair over this in the past.

An example by setting Firefox to 32bit by default

#!/bin/bash

# Check to see if Firefox exists
if
ls -la /Applications/Firefox.app/Contents/Resources

then

# Set the architecture preference order to 32-bit first
defaults write /Applications/Firefox.app/Contents/Info "LSArchitecturePriority" '(i386, "x86_64")'

# Making sure the permissions on the Info.plist are correct
chmod -R 775 /Applications/Firefox.app/

else
echo "Firefox is not installed"

fi

mbuckner
Contributor

I had to set Safari to run in 32 bit mode for Pearson's TestNav software to run at school. I created a new snapshot, changed Safari to 32 bit mode, took a snapshot, and created a package. I checked fut and feu, then pushed it out. The next time they started safari it was in 32 bit mode.

tkimpton
Valued Contributor II

Trust me FUT doesn't cut it. When you set an app to 32bit manually it writes to the user launch services plist in binary specific to that machine only.

Only way is to set the launch services priority in the apps plist directly.

Otherwise you will find out the hardway pulling your hair out trying to work out why it worked on your dev box but not production machines.

Been doing it for years :)

rmanly
Contributor III

@tkimpton I believe you and your solution is definitely more elegant but going the launchservices route worked for me and I had almost everything that I thought people would print from in there. </0.02>

Address Book
Text Edit
Safari
FF
Pages, Numbers, Keynote
Maybe Office?
Even System Preferences though I don't remember why...maybe just to save the annoyance of it saying it had to reload for something? an old version of SMART Board tools maybe?

For anyone reading this I would definitely follow tkimpton's solution and see if it works with your particular problem app.

taugust04
Valued Contributor

@tkimpton, thanks for the proper defaults domain and key to use. This will work nicely!

~Ted

tkimpton
Valued Contributor II

My pleasure Ted. Glad to of helped you out :)

dkucmierz
Contributor

I've done this in the past by creating an applescript app to open the target application in 32 bit mode using the shell command mm2270 mentioned, and told users to use the "AppName Launcher.app" that I had created and pushed to their machines.

luru27
New Contributor

taugust04 im having a similar task except were using Photoshop and Epson. what was your final solution?

taugust04
Valued Contributor

@luru27

I used a combination of the solutions mentioned above.

Tim's script works for the majority of applications I tested it with, however, I could not get it to work consistently with SilverFast, despite verifying the settings in the info.plist file were correct and readable by all users. I tend to believe this has more to do with how SilverFast is programmed on the Mac (horribly) than a defect in Tim's script or my implementation of it.

As a backup to when SilverFast ignores the info.plist file in the SilverFast 8.app bundle, I took the portion of the com.apple.LaunchServices.plist file that determines which applications open in 32-bit mode, and, added it as a managed preference in Casper, and scoped it to only computers with SilverFast 8 installed. This seems to work more reliably.

Hope this helps...

~Ted

seanbalsiger
New Contributor III

Does anyone have any suggestions on how to do this in Yosemite-Sierra? I tried the script above, confirmed the changes had been made in Info.plist, but my app (FileMaker Pro 14) didn't open in 32-bit mode. The LaunchServices plist trick doesn't seem to be working either, I'm assuming it's due to the encrypted data string that is added.