Launching a .mpkg file

Folks,

I need HELP!

I’m trying to write a script that does a very simple task - launch an .mpkg installer.

This is what i’ve written:

tell application “Finder”
activate
open “Installer.mpkg”
end tell

The script is executable and resides in the same folder as the .mpkg file. I keep getting the following error:

Finder got an Error: Cant get “Installer.mpkg”

However, when i double click the Installer.mpkg file, it runs normally.

Any clue?

Roberto.

Using this one liner saved as an app and placed in the same folder as your “Installer.mpkg” file should work:

Jon


[This script was automatically tagged for color coded syntax by Script to Markup Code]

Jon,

Thanks for the speedy reply. It looks like you’ve put me in the right direction. When i ran the one liner, it gave me a path error:

X:Applications:AppleScript:installer.mpkg wasn’t found

I want to put the script on a CD rom, how would i point to the installer if it’s on the CD? Clarification: both script and installer are on the cd in the same folder.

Roberto

This can’t be run from the Script Editor. When run from SE, the “path to me” command will return the path to SE. When saved as a script application and run from the Finder, it will return the path to the script application.

Jon

Hi,

You da man. It looks like it worked! Somethings up with the installer (but that’s another issue).

Sorry for being so dang clueless.

Roberto