KACE Product Support Question

Mac name pop up pre-installation task

03/22/2018 739 views
Does anyone have a pre-installation and mid-level tasks to prompt for a Mac computer name and apply it as part of the deployment process? We have these already scripted for Windows deployment and are looking to add this to the Mac process as well.
0 Comments   [ + ] Show comments


All Answers

This content is currently hidden from public view.
Reason: Removed by member request For more information, visit our FAQ's.
This content is currently hidden from public view.
Reason: Removed by member request For more information, visit our FAQ's.
Below is a preinstallation Mac OS X shell script task that can be sampled in a test environment, however, I can not promise this will work as I have not tested it.  Others participants here can also test and provide community assistance if necessary.  Otherwise, my recommendation is to contact QUEST KACE Professional Services, as this is really their expertise.


MAC=`/usr/sbin/networksetup -getmacaddress Ethernet 2> /dev/null | awk ' { print $3; }' | sed -e s/://g`
volume=`mount | grep -m 1 disk0`
zeroMount=`echo "$volume" | awk  '{  print substr($0,index($0, "on ")+3,index($0, "(")-index($0, "on ")-4) }'`
# prefPath=${KACE_SYSTEM_DRIVE_PATH}/Library/Preferences/SystemConfiguration/preferences.plist
# tComputerName=`/usr/libexec/PlistBuddy -c "Print System:System:ComputerName" $prefPath`
# computerName=`echo $tComputerName | awk '{ print index($0,"Not Exist") }'`
# if [ x$computerName == x0 ]; then
#   computerName=$tComputerName
# else
#   computerName="localhost"
echo -n 'Computername: '
read computername

echo $computername
echo $computerName > "${TEMP_PATH}"

exit 0
This should prompt for a computername, then write the name out to a file.  The file output should be /opt/kace/petemp/${MAC}.  MAC being the MAC address of the client computer.  The apply Mac OS X computername (the normal script) should write that out to the plist.  That's it, hope this works or at least provides a good direction for you work with! 

Answered 03/23/2018 by: WooLian
Yellow Belt

  • How To Contact QUEST KACE Professional Services (176023)

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login


This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ