How To Execute Bash Script Against Mac

RobinL1

Junior Member
Is it possible to have a script file to be executed / run on a Mac using Parallels?

I'm thinking I could create a Program in SCCM and point it to a .sh file - is this the right way to do this?

For example, I have the following script which I want to run after we install Office 2011 on a Mac:

#!/bin/bash
# Suppress Office First Run Setup For Each New User
sudo defaults write /Library/Preferences/com.microsoft.autoupdate2 HowToCheck -string Manual
sudo defaults write /Library/Preferences/com.microsoft.autoupdate2 LastUpdate -date '2001-01-01T00:00:00Z'
sudo defaults write /Library/Preferences/com.microsoft.error_reporting SQMReportsEnabled -bool NO
sudo defaults write /Library/Preferences/com.microsoft.error_reporting ShipAssertEnabled -bool NO
sudo defaults write /Library/Preferences/com.microsoft.office "14\UserInfo\UserOrganiation" -string 'Our Company Name'
sudo defaults write /Library/Preferences/com.microsoft.office "14\FirstRun\SetupComplete" -int 1
defaults write /Library/Preferences/com.microsoft.office "14\UserInfo\UserName" -string 'John Smith'

Thanks

Robin
 
Robin, you have two options:
1) Use Software Package with Program like: /bin/bash my_script.sh and Run mode: Run with administrative rights
2) Use Configuration Item for Mac with Script setting type. Set Discovery or both Discovery and Remediation scripts.
Remove 'sudo' from your script, it is not needed.
 
Back
Top