Remotely Add Preferred Wireless Network on 10.5.x?

Hi All,

In 10.6, they added some great new things to the networkutility command, chief among them (for me anyway) being the -addpreferrredwirelessnetworkatindex flag. Looking back at 10.5, I can’t seem to find anything that duplicates this. The airport command hidden away in the frameworks allows me to switch networks (as does networkutility), but it doesn’t add it to the preferred list.

Anybody know how to add a wireless network to your preferred networks via command line (preferred) or applescript?