Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

CFBundleExecutable in Info.plist is ignored

Hi,
I'm trying to customize the behavior of certain application bundles by editing the Info.plist preferences. The idea is to change the CFBundleExecutable key to point to a different file. Unfortunately, my changes seem to be ignored.

As a test, I placed an executable shell script named 'test' in /Applications/TextEdit.app/Contents/MacOS/ which launches a different application (so that i will be obvious when it works). Then I opened /Applications/TextEdit.app/Contents/Info.plist in Property List Editor and change CFBundleExecutable from 'TextEdit' to 'test', and saved it. Now when i double click on TextEdit.app, it should execute my shell script, but instead TextEditor is still launched.

It seems the bundles are hard-wired to execute a file with the same name as the bundle. Is there any way to change this?

If there is a better place to post this question, please let me know.

thanks in advance,
chad

Mac OS X (10.4.11)

Posted on Apr 22, 2008 6:42 PM

Reply
5 replies

Apr 22, 2008 10:07 PM in response to Chadrik

Hi Chad--

I didn't try it with TextEdit, but I was able to fool around with a bundle I created specifically to test this.

What I found was that changing CFBundleExecutable in the Info.plist file didn't have any effect until I copied the bundle into another folder or onto another volume, and ran it from there, which forces Launch Services to update its copy of the cached Info.plist (an idea I got from the NeoOffice Wiki). I didn't try opening another program, instead each one printed out a bit of text, which got logged in the console.log, so I knew the executable was changing...

charlie

CFBundleExecutable in Info.plist is ignored

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.