Icons - Force Finder to Reload Plist File with Terminal

So, I have an app called Magic Engine (henceforth ME). It should be in...
Applications/Magic Engine/MagicEngine.app

This app reads files with the .PCE file extension. These files normally display with the generic EXEC icon. I wanted to change the icon, so I put a new icon in the Resources folder and added a few lines to the Plist file...

<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>pce</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>pce.icns</string>
<key>CFBundleTypeName</key>
<string>PCE ROM</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>NSDocumentClass</key>
<string>MEPCEROM</string>
</dict>
</array>
<key>CFBundleExecutable</key>
<string>MagicEngine</string>

**Note: the '+' signs around the code were supposed to create italics, and indicate the original code. I inserted everything in between.

But it didn't work, I thought.
If I moved the ME folder to the desktop the PCE files would show the new icon and the file Kind would display properly - total joy.
But if I moved the ME folder back into Applications, the icons would revert to the generic EXEC icon.

So I poked around and found a Terminal command that would supposedly force Finder to reload a Plist file...
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchSe rvices.framework/Versions/A/Support/lsregister -f /Applications/iWork\ \'08/Pages.app

...and I modified it in an attempt to use it for my purpose...
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchSe rvices.framework/Versions/A/Support/lsregister -f /Applications/Magic Engine/MagicEngine.app

Terminal's response was:
ThrottleProcessIO: throttling disk i/o

...which I think is not so good.
Nothing seems to be broken, but still no dice on the icons.

*So, two questions:*
1 - Do I need to 'fix' the Terminal command that I entered. If so, how?
2 - How do I get the darn PCE file type icon to load when the ME folder is in the Applications directory?

*Please help save me from myself :/*

iMac, Mac OS X (10.6.4)

Posted on Jul 26, 2010 12:35 PM

Reply
2 replies

Jul 26, 2010 10:00 PM in response to xenowing

I haven't tried adding filetypes, so I don't know if what you are trying is possible, however,
re 1. the Terminal command,
in the path, where there is a space in the folder name you need to escape it with a backslash.

you had
...lsregister -f /Applications/Magic Engine/MagicEngine.app

but is needed
...lsregister -f /Applications/Magic\ Engine/MagicEngine.app

whether that avoids the "ThrottleProcessIO: throttling disk i/o" error message .. as I say, you're the pioneer here.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Icons - Force Finder to Reload Plist File with Terminal

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