Have a quick question. I’m making a little app with Applescript to aid me in installing drivers on a PowerBook G4. What I want to do is drag drivers (kexts, bundles, plugins, etc) onto the icon and install them to the Extensions folder. Since this is a System folder, I need Admin Privileges.
As of now my block of code looks like this (just a snipit of the actual copying part):
on open drop_drvs -- dragged drivers get drop_drvs repeat with a_drvr in drop_drvs -- a_drvr is any drivers dropped on script/app tell application "Finder" copy file a_drvr to folder "Extensions" of folder "Library" of folder "System" of startup disk end tell end repeat do shell script "chown -R root:wheel /System/Library/Extensions/*.*;chmod -R 755 /System/Library/Extensions/*.*;rm -R /System/Library/Extensions.mkext" with administrator privileges display dialog "(drop_drvs's length)" & " Driver(s) installed successfully! " end open
I would do this using a “do shell script ‘cp -R /blah/blah.kext /System/Library/Extensions/’ with administrator privileges” but I don’t know if I can pipe multiple files to that command using Drag and Drop with Applescript.
Any tips would be great. Thanks!
Browser: Safari 537.71 (Leopard-Webkit Stable)
Operating System: Mac OS X (10.5)