AutoInstaller on USB Stick

Hi Folks,

is it possible to create an autoinstaller on an usbstick?

The User plugs in an usb device (flash rom, usbstick, usb harddrive) and when the os has found the device an applescript on the
device should start an installation program…

Do you think that this is possible?

On Windows Maschines this autoinstaller is working, but on Mac I haven´t seen this…

Thanks for any tipps, tricks, hints…

Stefan

I think it’s a security issue. I would resent it if plugging in a stick ran a script I hadn’t had time to examine first. Just my 2¢.

An out of the box solution that works on every (unknown) Mac will be hard to find
However, when you install a (stay-open with idle handler, timed, QuicKeys, whatever) script on a host Mac that periodically calls the following repeat loop, it will open any file whose name contains “autoexecUSB” on any removable volume.


tell application "Finder"
	set rvs to (name of the disks whose local volume is true and name is not "Network")
	repeat with rv in rvs
		open (every file of folder rv whose name contains "autoexecUSB")
	end repeat
end tell
do shell script "sleep 30" -- or any other idle time, not necessary in idle scripts

Note: with this, your Mac is a security risk to anyone who knowingly uses this to execute illegal code

Hi Folks,

thanks for your help! This hints are very useful!

Thanks a lot!

Best Regards,

Stefan

Unix launchd may be the way to trigger the script elegantly, as Adam Bell pointed to this interesting article
http://macscripter.net/articles/440_0_10_0_C/