Autorun finder when plugging in USB Stick

Discussion in 'Mac Basics and Help' started by Vkrati, Aug 3, 2009.

  1. Vkrati macrumors newbie

    Joined:
    Oct 15, 2008
    #1
    Hi,

    Just wondering if there is any setting somewhere, somehow. It probably hardly improves my productivity, but just wondering... :)

    I remember this was proposed to you when you plugged in a USB-stick in Windows. Wonder if its also possible here...

    Thanks in advance!
     
  2. geoffreak macrumors 68020

    geoffreak

    Joined:
    Feb 8, 2008
  3. xUKHCx Administrator emeritus

    xUKHCx

    Joined:
    Jan 15, 2006
    Location:
    The Kop
    #3
    Do Something When will allow you to set up a rule to d something when your drive is mounted.
     
  4. Vkrati thread starter macrumors newbie

    Joined:
    Oct 15, 2008
    #4
    Hi,

    fist of all, thank you for all replies alredy. Do Something When might indeed seem like a solution. I tried to install it though, and apparently its a .pkg file. Point is, i try to give freeware, of any kind, no admin permissions. (Maybe some heritage i still have from when i was into that other operating system...) I assume that, as i feared already actually, it is always necessary for 3rd party software, to get admin rights.

    So question is whether this is really safe, or if there are maybe some other possibilities, through OSX itself.

    Thanks though!
     
  5. xUKHCx Administrator emeritus

    xUKHCx

    Joined:
    Jan 15, 2006
    Location:
    The Kop
    #5
    Technically you don't have to give it your user name and password. If you right click on the .pkg - Show Package Contents and then through Contents you can then double click on "Archive.pax.gz" which will decompress and a window will open up with the DSW.prefPane in it. Then you can double click on that to install. System Preferences will ask for username and password if you want to install it for all users on your system but installing it for yourself it wont.

    You could attach a folder action to the /Volumes folder which will run a script when something is added to that folder. You can then customise the script to do some quite powerful things

    For example with a USB drive called Test this script will launch Safari.

    Code:
    on adding folder items to this_folder after receiving added_items
    	if (added_items as string) contains "Test" then
    		tell application "Safari" to launch
    	end if
    end adding folder items to
    To attach a folder action to a folder first you have to have the folder shown in Finder.

    For /Volumes the easiest way is to get a normal Finder window open and Press cmd+shift+g then type "/Volumes" without quotes

    Then enable folder actions:

    Picture 1.jpg

    And attach the script to the folder:

    Picture 2.jpg


    You might also be able to achieve something similar using a daemon but that is an area I have no idea about.
     
  6. Vkrati thread starter macrumors newbie

    Joined:
    Oct 15, 2008
  7. 3bs macrumors 603

    3bs

    Joined:
    May 20, 2011
    Location:
    Dublin, Ireland

Share This Page