2 Replies Latest reply: Sep 21, 2011 7:22 AM by mahender negi
mahender negi Level 1 Level 1

Hi All, I want to deploy a script which will disable all usb storage devices. I have the commands but want to deploy it via apple script so that it can't be edit or modified after deployment.

 

cp /System/Library/Extensions/IOUSBMassStorageClass.kext ~/backup/

sudo srm -rf /System/Library/Extensions/IOUSBMassStorageClass.kext

sudo touch /System/Library/Extensions

sudo reboot

 

Thanks in advance


Mac Book Pro 2.66 GHz,I-Mac Intel, Mac Pro DP,PowerMac G5 DP 2.0GHz,E-mac 1Ghz, Mac OS X (10.5.8)
Solved by John Maisey on Sep 20, 2011 7:33 AM Solved

Hi,

 

You can wrap UNIX commands in Applescript by using:

 

do shell script "YOUR_COMMAND"

 

See here: http://developer.apple.com/library/mac/#technotes/tn2065/

 

Best wishes

John M