Hey everyone,
I'm trying to execute:
sudo defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText "Your login window message text goes here"in my macOS program. Basically, I wan't to be able to change the Login Window text.
I've tried:
let process = Process()
process.launchPath = "/usr/bin/env"
process.arguments = ["sudo", "defaults", "write", "/Library/Preferences/com.apple.loginwindow", "LoginwindowText", "\"Your login window message text goes here\""]
process.launch()
process.waitUntilExit()But get an "Operation Not Permitted" error
Does anyone know how I can do this? Or more specifically does anyone know of a way to alter the defaults in com.apple.loginwindow.
I'm fairly new to this, so any advice is appreciated 🙂 I am using Swift 4, with Xcode 9.1
Thanks!