These are various scripts and programs I have written to help out in many different situations. Some of them are unfinished, they need modification to work in specific environments, but I try to make that clear in the descriptions. Many of these scripts were written for specific purposes under specific operating system versions and may no longer be valid for modern OS’s. I am leaving them here for education purposes. Always remember to test any script before deployment to make sure it works, and it does what you need/expect it to do.


Dual Boot Restore

This shell script will partition a hard drive into two partitions, restore an Apple ASR image to the first partition, restore a Windows NTFS image to the second partition and save the units asset tag, serial number, ethernet MAC address, bluetooth MAC address and airport MAC address to a text file for inventory.


There are some variables that need to be set in the script; the image names and locations, the partition sizes and the location of the inventory file (it will make one if one does not exist in the location). Edit the script by dragging it on top of TextEdit, or use your favorite text editor. Do not double click on it the file to edit it. Double clicking executes the script.


Download Dual Boot Restore.command


AUP Viewer

This is a small application that will display a text file based Acceptable Use Policy and force the user to either agree to it or disagree with it. Typically this will be set as a Login Item, so that the user must choose as soon as they login. If the user chooses I Agree, the viewer quits and the user can continue to use the computer.


If the user chooses I Disagree, then it immediately logs him out.


The program, when launched, quits the Finder and hides the Dock by turning Hiding on (assuming it isn't already on) and placing the Dock up above the Menu Bar. The user's settings for Hiding and Location are restored whether or not they agree to the AUP.


Download AUP Viewer


dropbox.scpt

This is an Applescript I wrote to autocreate student folders in a drop box environment. The idea was to use it as a Folder Action Script, so that when a user drops a file on the drop box folder, it would create a new folder inside the drop box with the user’s full (long) name and put the dropped item in. It works fine, except that drop boxes tend to be write only. It creates the folder properly, but can’t move the new item in because it cannot see the items once dropped.


Download dropbox.scpt



FolderRedir

This is an Applescript Application that is built to run as a Login Item (not loginhook) on Mobile Computing machines. When run, it first checks that you have never successfully run this script before on this machine, then it renames the local Documents folder and creates a symbolic link to the network based Documents folder. This way, the user doesn’t need to worry about what folder he is saving in, it just uses the server based Documents folder. This sometimes needs to be edited, depending on how your home folders on the server are setup.


Download FolderRedir


KidPixFolderRedir.zip

This is another Applescript Application that is built to run as a Login Item (not loginhook). It redirects the Kid Pix 4 (not KP 3x) local folders so that all the user’s documents are saved in their Documents folder, instead of the local Kid Pix folder in the /Users/Shared folder. It also autocreates a user name for KP 4, so when the user launches KP 4, their name will be there in the list. If you are using KP 4 Network version, you may need to edit the kp.cfg file before this will work. The standalone version of KP 4 is fine with this script as is.


Download KidPixFolderRedir



MCBackup.zip

This is an AppleScript Studio Application that was supposed to do the same thing as Network Login, without requiring the user to login to the server. No user intervention is needed, other than just launching it. It requires that the user is using Mobile Computing (Network Login does not require this). It works well, but often needs to be edited for different environments.


Download MCBackup.zip



Safari date converter.zip

This is an AppleScript Application that takes the date code in the Safari History file and converts it to a human readable Date and Time listing. At some point, I will be converting this to a pretty AppleScript Studio project, but in the meantime it just works. Type (or, better yet, paste) the date code in the dialog box, and it returns the Date and Time.


Download Safari Date Converter


I have also created an Applescript that will create the folders recommended in the Group Folder Creation document and set the permissions accordingly. It asks for the admin (owner of the folder) name and the group and then figures the rest out automatically via Directory Services.


Download Create Group Folders Applescript

Scripts and Miscellany