How to controll the disk autostart programming in mac?

Discussion in 'Mac Programming' started by MayPeng, Jan 23, 2011.

  1. MayPeng macrumors member

    Joined:
    Nov 21, 2010
    #1
    Hi,guys
    Counld you know that how to How to controll the disk autostart programming in mac?

    I use the MacImage tool to produce a HFS volume. So every time i plug my usb device to the mini mac, it will autostart.

    Now i want to controll autostart in my code whenever i want it appear it will appear.

    How could i do?

    Thank you!
     
  2. MayPeng thread starter macrumors member

    Joined:
    Nov 21, 2010
    #2

    I want to supply as the following:
    i have a way that i first get disk path and then simulate mouse right-click or double-click to display contents in disk. Now i have gotten its path .
    but i want to simulate mouse right-click or double-click to perform the
    "Open" operation to display contents in the disk;
    How to do it ?
     
  3. gnasher729 macrumors P6

    gnasher729

    Joined:
    Nov 25, 2005
    #3
    Applications that start automatically when a USB device is plugged into the Macintosh would be very, very dangerous. A hacker with a carefully prepared device could hack into any Macintosh that is not carefully watched in public.

    I assume that Apple has done their best to make this impossible, and don't expect anyone to help you with this.
     
  4. lloyddean macrumors 6502a

    Joined:
    May 10, 2009
    Location:
    Des Moines, WA
    #4
    Very true - thus the deafening silence!
     
  5. balamw Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #5
    autorun is one of the worst features of Windows. (JMHO). I prefer the way Mac OS X handles DMGs, put it "in your face" and it's your responsibility to perform the desired action (copy to Applications folder, etc...).

    B
     
  6. lee1210 macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #6
    By "carefully prepared" you mean like a bootable copy of an OS install disk that lets you reset admin passwords? =)

    You can make a very pleasant looking finder window including an image with instructions on installation, etc. or an installer.

    http://forums.macrumors.com/showthread.php?t=474334

    That thread links a site that gives some details on prepping your nice looking window that will open on mount.

    -Lee
     
  7. gnasher729 macrumors P6

    gnasher729

    Joined:
    Nov 25, 2005
    #7
    I was thinking about something a lot faster. In public you would watch your MacBook so nobody can steal it. There is no way someone could boot from a USB drive while you watch it. But they might be able to plug in a USB stick, and if some small app launches automatically and quickly, that could do a lot of damage.
     

Share This Page