How to mount all types of CD/Disk images more easily

| | Comments (8)

This is a modified version of a script that I originally saw on macosxhints

Mainly, this version allows the mounting of audio disk images in the Sd2f format used by Toast. This requires that Toast 5.1.x be installed on the drive, although Toast itself is not launched to mount the image.
My modifications also add support for additional suffixes and some support for OS9 files which lack a suffix (instead scan for file type)

There are additional versions floating around which offer greater functionality, including the ability to handle weird characters (which mine does not). At some point it might be a good idea to merge the superior file handling with this code. Hopefully by then this will all be integrated into Panther.

To use, paste the code into script editor, save as an app or compiled script and then use in any way an applescript can be used within OS X, my personal favourite is to use BigCat (a Contextual Menu that hosts scripts)

tell application "Finder" to set filelist to selection as list
repeat with aFile in filelist
if ((aFile as string) ends with ".dmg" or
(aFile as string) ends with ".img" or
(aFile as string) ends with ".iso" or
(aFile as string) ends with ".cdr" or
(aFile as string) ends with ".toast" or
(aFile as string) ends with ".smi") then
do shell script ("hdiutil mount \"" & POSIX path of (aFile as string) & "\"")
else if ((aFile as string) ends with ".Sd2f") or (file type of aFile as string is "Sd2f") then
do shell script ("\"`locate ToastImageMounter`\" \"" & POSIX path of (aFile as string) & "\"")
else
display dialog "Not a valid image"
end if
end repeat

8 Comments

Mike Perry said:

Can I open a .dmg file with OS9, I havn't upgraded to OSX yet.

Marcel M said:

The script you state to copy/paste has syntax error "Expected expression but found end of line

TheGuru said:

If you are on OS9.1 or higher and have Roxio Toast 5.1 and up, you have an option.

Open Toast and select disk image as the type of operation you wish to complete.

Drop the dmg file onto the Toast window.

If it takes it, you should be able to click mount to view and use its contents.

If Toast says it is an unrecognizable file, just tell it you want to use the file anyway, and accept its default settings in the next box.

Then, from the 'File' menu, select 'Save as disk image' and save the file.

Double click the file you just created, and presto! It should now mount giving you access to all those 'unavailable' files. By the way, you no longer need to have Toast open.

adriano said:

Hi

I'm Adriano

I have problem to mount an dmg file of Mac osx Jaguar

I was wondering if you can help me with this issiu,

It would be verry kind of you

Thanks Adriano

Masaki said:

I have .dmg's of osx and was wondering how I can mount them if at all possible with OS 8.6. Any help would be greatly appreciated.

Dr. G said:

The following line in script causes error:

do shell script ("\"`locate ToastImageMounter`\" \"" & POSIX path of (aFile as string) & "\"")

...but there IS a ToastImageMounter in the Toast.app package (v.6.0.5)!

Any solution?

Alex McHugh said:

Dr. G

I am currently half the world away from my mac but I know that the locate command as written above will fail if there is more than one copy of ToastImageMounter on the disk, potentially cause you still have older versions of Toast around.

However from memory I have experienced problems with this hack and newer versions of toast and fixed them for a friend (who is the primary reason I hacked this script)

lien said:

Hi,

It may sound strange but my toast 5.2.1 doesn't have Other in the toolbar. Why is that? And what have I done wrong? Can someone help me out of my misery?

Thanks

Leave a comment

About this Entry

This page contains a single entry by Alex McHugh published on June 17, 2002 6:41 PM.

Inside the Mac OS X .pkg format was the previous entry in this blog.

Command line CD-R mastering is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Powered by Movable Type 4.01