Is there a way to configure a disk image such that every time I mount it, a file contained within the disk image automatically opens?
Autorun of executables on removable storage is a huge security risk. You cannot do that on a Mac.Is there a way to configure a disk image such that every time I mount it, a file contained within the disk image automatically opens?
Autorun of executables on removable storage is a huge security risk. You cannot do that on a Mac.
Autorun is part of a bad nightmare I remember from my windows days along with "hide extensions." I might not be the typical switcher who is looking for Windows-like things on OS X because I used Linux before OS X and one of my favorite things is I could click on stuff I wanted to happen and stuff I didn't click on never ever happened. What a concept.
The reason Apple has disabled this is security. They don't want malware, adware or crippleware launching when you insert a CD. I seem to remember there were DRM programs Sony used to include on music CDs that would install and run before you knew what was going on. Whether it's some greedy company trying to stop you from listening to stuff you bought unless you pay for it over again or some hacker trying to steal your logon Apple wants no part of that nonsense and I don't blame them one bit. The itsy bitsy down side is you gotta click to run something. Now where'd I put my violin?
Image
BTW, while I agree that running something you created from a dmg, memory stick or even a cd would be nice, html can include malware these days and I don't mind the situation we are in. Suppose there was a big switch you could throw to enable autorun. You get your project done and forget about it. About 3 years later, a friend comes over, inserts some CD in your Mac and it installs something you don't want or need before you realize it.
There is only a handful of malware out for OS X, but one in particular relies on a user to be logged in as Admin and running Safari. Malware gets downloaded and installed if the user has left "automatically open safe files" enabled. And wouldn't you know a dmg is considered a safe file, even if you just downloaded it from hackerz.gunning.4.u
No, there isn't.Thanks for that really detailed explanation. Macs' lack of an autorun feature is a really good security precaution. But is there a way to bypass it?
Thanks for that really detailed explanation. Macs' lack of an autorun feature is a really good security precaution. But is there a way to bypass it?
I know it's a security risk, but for this one disk, I think I'm pretty safe. Trust me when I say the files on the disk image are 100% safe and created entirely by me. Is there a workaround to the autorun thing? Perhaps some sort of automator script?
If it's just one particular image you're looking to mount then an applescript to mount and open the file may be a solution.
Yes, that is what I am trying to accomplish. Do you know what sort of applescript commands I ought to use?
tell application "Finder"
open item "Path:to:disk:image"
delay 1
open item "Path:to:file:in:image"
end tell
Dead easy.
Code:tell application "Finder" open item "Path:to:disk:image" delay 1 open item "Path:to:file:in:image" end tell
Thanks for the code. However, I can't seem to get it work, even though I checked the file path several times. Could you do an example for me?
Assuming my inputs are as follows,
disk image file: \a.dmg
file inside disk image: b.pages
tell application "Finder" to set the clipboard to the selection as text