Cleanup Program Code

So my wife's company buys new MacBook Pro's for each of their new employees and spends hours setting up each new computer to a certain clean spec. I've worked on PC's my entire life and on PC we have things like .BAT Executables that we can create with simple notepad, and we can create lines of code to run cleanup of desktop freeware shortcuts and generally to make the desktop nice and clean and ready for each customer. I am looking for something like this for my wife to help lower the amount of time that she has to spend on each new computer. I need something that I can simply run from a PIN Drive preferably, or just a simple file that when you run it it removes shortcuts from the Mac Dock. Does anything like this exist, or is there anything like .BAT Executables that I can make a line of code for MACs that will remove specific shortcuts from the dock? Thanks for the help in advance.

Posted on Jun 7, 2024 8:56 AM

Reply
7 replies

Jun 7, 2024 8:16 PM in response to In2Madness

Bash and Zsh scripts are the Apple or *nix equivalent. Apple also has AppleScript and Automator options as well although I believe one of these latter two options may be deprecated these days although they both are still available. Also keep in mind that Apple tends to make major changes between different versions of macOS, so what may work today may not work with the next major version of macOS. Many Apple preferences/settings are stored in .plist preference files located in "~/Library/Preferences" folder. This Library folder within the home user folder is hidden by default in macOS. Like I said, Apple may change the layout of these .plist files with the next new OS. There are special command line utilities within macOS to configure various settings, but they can be hard to use as there is usually very little documentation.

FYI, Apple products are just made to be used exactly as Apple designs & ships them. Be careful trying to use the product in any other manner. Yes, you can use them in other ways & manage them in other ways, but you may find yourself doing a lot more work to maintain it that way. macOS has been moving towards an iOS like environment for years, so keep this in mind when managing macOS.

Jun 8, 2024 8:19 AM in response to In2Madness

A company that spends hours setting up new Mac computers for employees may already have them under remote managed administration and that may interfere with any homegrown solutions. Best to check with their IT department.


Apple's macOS is a UNIX operating system and has nothing in common with Windows including the need for any anti-virus applications.

Jun 8, 2024 9:01 AM in response to VikingOSX

I wouldn't have asked such a question if they had an IT Dept. It's a startup company and this is one of her many responsibilities at the moment. I'm just trying to help my wife save some time on prepping the new MacBooks for their new hires. Since I have many years working on PC's and know that you can use a .Bat executable to cleanup the desktop of items, I simply thought that surely their must be something somewhat similar for the MacOS that someone can write and then execute in order to accomplish similar goals faster. Thank you for making me restate my point btw.

Jun 8, 2024 9:05 AM in response to John Galt

Apple Store informed us of such management tools, except our worry is that that would remove the power from the company's hands at least to a small degree, and thats not what we are after. Just looking to run a line of code that removes specific items from the dock and can use it via flash drive or something similar. Pop it in a USB slot, run the code, and voila, the dock is cleaned up. That is what I am after. you would not believe how doing it all manually can increase your workload time by multiplying it by the number of computers.

Cleanup Program Code

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.