Trying to make something more glamorous than it should be. I have an apple script that's fairly simple for cleaning up wifi on our workstations when our VPN client mucks DNS/Search domains.
do shell script "networksetup -setsearchdomains 'Wi-Fi' empty" user name "ADMIN" password "PASSWORD" with administrator privileges
do shell script "networksetup -setdnsservers 'Wi-Fi' empty" with administrator privileges
Trying to make that infinitely more portable and glamorous and I reealise that I can make lists easily with something like
set PORTS to do shell script "networksetup -listallnetworkservices | tail -n +2"
but I'm scratching my head as to how to make my list become a string to enable buttons to accommodate various hardware models/port configs. Any help would be appreciated. And before you ask why an AppleScript, it's because we're deploying to both admins (who can elevate) and non-admins, and with the AppleScript I can pass elevated credentials and set as a run only application.
If you're an AppleScripter or have some other thoughts, greatly appreciated.
Oh... BTW.. It's 5 o'clock on a Friday and my brain has decided to turn off.