Script commands for System Preferences on OSX

Joined
Aug 12, 2019
Messages
4
Reaction score
0
Points
1
Hello Forum,

I'm new to this site. I'm currently learning how to script. However, I'm running into some issues. I'm using Text Wrangler to save my scripts. I don't know where to go to learn how the commands for each options in the System Prefernces. Any guidance will be much appreciated. I'm trying to save time by wrtting a script that can run my customization.

Thanks in advanced.
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,745
Reaction score
2,071
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
Not nearly enough information for us to help you. Script in what language? Script to do what? What does Sys Prefs have to do with this?
 
OP
R
Joined
Aug 12, 2019
Messages
4
Reaction score
0
Points
1
Hello, Thanks for your quick replied.

I'm using Bash and learning several commands. The reason why I'm trying to script, is to simplify my work. Usually it takes me a long time configuring or customizing the OS. I seen several videos where they create a script for every option they select with the System Preferences ans it customize it in seconds. I hope this makes sense. I don't know how else to explain it.
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,745
Reaction score
2,071
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
Unless I'm mistaken, none of the System Preferences components are exposed in a manner in which you can modify them through a Bash script. If you were to use AppleScript, it might be possible to automate some of the UI interactions, but even that might be limited.

What you should tell us WHAT part of the OS you are trying to customize and how. How often are you making these configuration changes requiring you to automate it with a script? If you are doing this in a institutional setting where you are doing this on multiple Macs, that's a different story, but if this is on your personal Mac, why would you be tweaking these settings constantly?

If your intention is to learn to script, perhaps you should set a different goal and then see if your Bash scripting an be applied elsewhere.
 
OP
R
Joined
Aug 12, 2019
Messages
4
Reaction score
0
Points
1
If using apple script will work better than I will try that instead. The reason why I want to learn to script, because I want to be able to push the scripts I create through JAMF. It's for an instition. I'm currently managing over 500 Macs. Some require special configuration and others are standard. I just don't know which direction to start. That's why I'm here.

Some of the System Preferences I want to be able to tweak in a fly are Screen Saver, Parental Controls, Adding passwords to WIFI connections,
Sharing so I can change the computer name and so on. All these specific customization can take a long time.
 
Joined
Oct 16, 2010
Messages
17,496
Reaction score
1,541
Points
113
Location
Brentwood Bay, BC, Canada
Your Mac's Specs
2011 27" iMac, 1TB(partitioned) SSD, 20GB, OS X 10.11.6 El Capitan

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top