Posted on 06-18-2024 11:33 AM
Hey all,
I am using the script below to install Maya 2024 and activate it using a network license. This is the script we used for the past 3 years. I've made the necessary changes to the script (product key, year, server), double checked things a few times and still can't figure this out:
#!/bin/sh
#Instructions for next time
#Copy installer app to /tmp using Composer package
#Modify values below as necessary (Usually: year pKey and serial)
#Make sure to check pkgPath1-10 match latest installer
#Set variables
year="2024"
pkgPath1="/tmp/InstallMaya2024.app/Contents/Helper/Packages/Licensing/AdskLicensing-13.3.1.9694-mac-installer.pkg"
pkgPath2="/tmp/InstallMaya2024.app/Contents/Helper/Packages/Licensing/adskflexnetserverIPV6.pkg"
pkgPath3="/tmp/InstallMaya2024.app/Contents/Helper/Packages/Maya/Maya_AdLMconf2024.pkg"
pkgPath4="/tmp/InstallMaya2024.app/Contents/Helper/Packages/Maya/LookdevX.pkg"
pkgPath5="/tmp/InstallMaya2024.app/Contents/Helper/Packages/Maya/MayaUSD.pkg"
pkgPath6="/tmp/InstallMaya2024.app/Contents/Helper/Packages/Maya/Maya_core2024.pkg"
pkgPath7="/tmp/InstallMaya2024.app/Contents/Helper/Packages/Maya/bifrost.pkg"
pkgPath8="/tmp/InstallMaya2024.app/Contents/Helper/Packages/Maya/MtoA.pkg"
pkgPath9="/tmp/InstallMaya2024.app/Contents/Helper/Packages/Maya/AdobeSubstance3DforMaya-2.4.0-2024-mac-universal.pkg"
pKey="657P1"
networkServer="server"
licPath="/Library/Application Support/Autodesk/AdskLicensingService/${pKey}_${year}.0.0.F"
licFile="LICPATH.lic"
lgsFile="LGS.data"
#Declare functions
runInstaller ()
{
/usr/sbin/installer -verboseR -pkg "${pkgPath1}" -target /
/usr/sbin/installer -verboseR -pkg "${pkgPath2}" -target /
/usr/sbin/installer -verboseR -pkg "${pkgPath3}" -target /
/usr/sbin/installer -verboseR -pkg "${pkgPath4}" -target /
/usr/sbin/installer -verboseR -pkg "${pkgPath5}" -target /
/usr/sbin/installer -verboseR -pkg "${pkgPath6}" -target /
/usr/sbin/installer -verboseR -pkg "${pkgPath7}" -target /
/usr/sbin/installer -verboseR -pkg "${pkgPath8}" -target /
/usr/sbin/installer -verboseR -pkg "${pkgPath9}" -target /
}
createLicenseFiles ()
{
if [[ ! -e "${licPath}" ]];
then
/bin/mkdir "${licPath}"
fi
/usr/bin/touch "${licPath}/${lgsFile}"
/bin/chmod 777 "${licPath}/${lgsFile}"
/usr/bin/touch "${licPath}/${licFile}"
/bin/chmod 777 "${licPath}/${licFile}"
/bin/echo "SERVER ${networkServer} 000000000000" > "${licPath}/${licFile}"
/bin/echo "USE_SERVER" >> "${licPath}/${licFile}"
/bin/echo "_NETWORK" >> "${licPath}/${lgsFile}"
}
licenceHelper ()
{
/Library/Application\ Support/Autodesk/AdskLicensing/Current/helper/AdskLicensingInstHelper change --pk "${pKey}" --pv "${year}.0.0.F" --lm NETWORK --ls "${networkServer}"
}
cleanUp ()
{
/bin/rm -rf "${pkgPath}"
/bin/rm -rf "${tmpfile}"
}
#Run script
runInstaller
createLicenseFiles
licenceHelper
cleanUp
Everything seems to install fine, but the network license isn't activated. Jamf logs are returning this error at the end without everything else being successful:
connecting to Service failed: reading configuration file /Library/Application Support/Autodesk/AdskLicensingService/AdskLicensingService.data failed: open /Library/Application Support/Autodesk/AdskLicensingService/AdskLicensingService.data: no such file or directory
This file is not there and I don't remember it being there in 2023. Did something change with the installer or am I just doing something wrong? Are we supposed to be creating this file now? Any help would be greatly appreciated.
Solved! Go to Solution.
Posted on 06-19-2024 07:48 AM
For 2023 I found a different script to install the apps. It uses the built in tools to do a silent install of the AutoDesk apps. I have not looked at a 2024 version yet so I am unsure as to if this will help you. It does however have some tips on the license and making that work. Hope this helps.
#!/bin/zsh
### Install AutoDesk Combo 2023 (AutoCAD, Maya & MudBox)
### silently @ login window with network licenses (aka multi-user lab/classroom deploy)
### 2022.07.27 by JonW
### Simply update variables/products below the function section as desired
### Read the additional details at the end of the script for more clarity on licensing.
### Ensure:
### 1) installer app(s) re-packed from .dmg by Composer & deployed to /private/tmp (root:wheel 755)
### 2) the network license server is functional
### 3) optionally, that previous Autodesk installations have been removed.
### and if so, you've also unloaded com.autodesk.AdskLicensingService.plist
#################################################
installFunction ()
{
### Before install, clear quarantine that may step on Setup.app when run at the login window.
### Also as of 2023, Mudbox still uses a different setup app path with --noui flag NOT --silent
### Finally, remove the installer app when complete
/usr/bin/xattr -rc /private/tmp/"${installerApp}"
if echo "$installerApp" | grep -iq "Mudbox"; then
/private/tmp/"${installerApp}"/Contents/MacOS/setup --noui
else
/private/tmp/"${installerApp}"/Contents/Helper/Setup.app/Contents/MacOS/Setup --silent
fi
/bin/rm -rf /private/tmp/"${installerApp}"
}
licenseFunction ()
{
### based off Onkstons's terrific work (I think they we're the first?) but simplified for 2023.
### see also, addl details at the end of script for alternative 'legit' licensing method.
licensePath="/Library/Application Support/Autodesk/AdskLicensingService/${productKey}_${year}.0.0.F"
/bin/mkdir -p "${licensePath}"
/usr/bin/touch "${licensePath}/licpath.lic"
/bin/echo "SERVER ${networkServer} 000000000000" > "${licensePath}/licpath.lic"
/bin/echo "USE_SERVER" >> "${licensePath}/licpath.lic"
/Library/Application\ Support/Autodesk/AdskLicensing/Current/helper/AdskLicensingInstHelper change --pk "${productKey}" --pv "${year}.0.0.F" --lm NETWORK --ls "${networkServer}"
}
#################################################
networkServer="your.network.license.server.here"
### AutoCAD
productKey="11111"
year="2023"
installerApp="Install Autodesk AutoCAD 2023 for Mac.app"
installFunction
licenseFunction
### Maya
productKey="11111"
year="2023"
installerApp="Install Maya 2023.app"
installFunction
licenseFunction
### Mudbox
productKey="11111"
year="2023"
installerApp="Install Mudbox 2023.app"
installFunction
licenseFunction
#################################################
### Verify license details - not required, but kind of nice to see.
/Library/Application\ Support/Autodesk/AdskLicensing/Current/helper/AdskLicensingInstHelper list
echo "Autodesk network licensing complete"
##################################################
### Additional network license details:
### For those who are curious, or if the above ever ceases to function:
### The 'legit' method for initial silent license registration (using autoCAD as an example) uses the 'register' command instead of 'change'.
### It also requires use of the --cf flag to denote a path to the app's config (.pit) file.
### e.g.
### configFile="/Library/Application Support/Autodesk/ADLM/.config/ProductInformation.pit"
### /Library/Application\ Support/Autodesk/AdskLicensing/Current/helper/AdskLicensingInstHelper register --pk "${productKey}" --pv "${year}.0.0.F" --cf "${configFile}" --lm NETWORK --ls "${networkServer}"
### The end result is the same as the 'change' method used above (at least after the initial app launch).
### Essentially the 'change' method works backwards to manually create the licpath.lic directory & file,
### then uses the 'change' command to register it.
### Anecdotally, the 'change' method appears to produce a slightly faster initial app launch,
### but it's hard to say which is better.
### Either way, it's good to know both & having handle on the AdskLicensingInstHelper utility helps a lot!
### Check these out >>>
### /Library/Application\ Support/Autodesk/AdskLicensing/Current/helper/AdskLicensingInstHelper register --help
### /Library/Application\ Support/Autodesk/AdskLicensing/Current/helper/AdskLicensingInstHelper change --help
### Also, either method seems to deploy fine while at the login window, so no worries there.
### Some good tips & reference:
### https://knowledge.autodesk.com/support/autocad/troubleshooting/caas/sfdcarticles/sfdcarticles/Use-Installer-Helper.html
### https://knowledge.autodesk.com/search-result/caas/CloudHelp/cloudhelp/ENU/Autodesk-Installation-Basic-ODIS/files/ODIS-silent-install-htm.html
### Hope this helps some folks out!
Thanks to JonW for the script.
Posted on 06-18-2024 11:50 AM
It's generally better to use bin/bash over bin/sh or bin/zsh when deploying a script with Jamf. Jamf loves to go dumb with other interpreters. That aside, what happens when you run the script locally?
Posted on 06-24-2024 01:37 AM
Hello, sorry for the late response. I actually used the script from PaulHazelden and was able to get the policy to verify the license after a bit of trial and error. Looks like my script may have been deprecated.
Posted on 06-19-2024 07:48 AM
For 2023 I found a different script to install the apps. It uses the built in tools to do a silent install of the AutoDesk apps. I have not looked at a 2024 version yet so I am unsure as to if this will help you. It does however have some tips on the license and making that work. Hope this helps.
#!/bin/zsh
### Install AutoDesk Combo 2023 (AutoCAD, Maya & MudBox)
### silently @ login window with network licenses (aka multi-user lab/classroom deploy)
### 2022.07.27 by JonW
### Simply update variables/products below the function section as desired
### Read the additional details at the end of the script for more clarity on licensing.
### Ensure:
### 1) installer app(s) re-packed from .dmg by Composer & deployed to /private/tmp (root:wheel 755)
### 2) the network license server is functional
### 3) optionally, that previous Autodesk installations have been removed.
### and if so, you've also unloaded com.autodesk.AdskLicensingService.plist
#################################################
installFunction ()
{
### Before install, clear quarantine that may step on Setup.app when run at the login window.
### Also as of 2023, Mudbox still uses a different setup app path with --noui flag NOT --silent
### Finally, remove the installer app when complete
/usr/bin/xattr -rc /private/tmp/"${installerApp}"
if echo "$installerApp" | grep -iq "Mudbox"; then
/private/tmp/"${installerApp}"/Contents/MacOS/setup --noui
else
/private/tmp/"${installerApp}"/Contents/Helper/Setup.app/Contents/MacOS/Setup --silent
fi
/bin/rm -rf /private/tmp/"${installerApp}"
}
licenseFunction ()
{
### based off Onkstons's terrific work (I think they we're the first?) but simplified for 2023.
### see also, addl details at the end of script for alternative 'legit' licensing method.
licensePath="/Library/Application Support/Autodesk/AdskLicensingService/${productKey}_${year}.0.0.F"
/bin/mkdir -p "${licensePath}"
/usr/bin/touch "${licensePath}/licpath.lic"
/bin/echo "SERVER ${networkServer} 000000000000" > "${licensePath}/licpath.lic"
/bin/echo "USE_SERVER" >> "${licensePath}/licpath.lic"
/Library/Application\ Support/Autodesk/AdskLicensing/Current/helper/AdskLicensingInstHelper change --pk "${productKey}" --pv "${year}.0.0.F" --lm NETWORK --ls "${networkServer}"
}
#################################################
networkServer="your.network.license.server.here"
### AutoCAD
productKey="11111"
year="2023"
installerApp="Install Autodesk AutoCAD 2023 for Mac.app"
installFunction
licenseFunction
### Maya
productKey="11111"
year="2023"
installerApp="Install Maya 2023.app"
installFunction
licenseFunction
### Mudbox
productKey="11111"
year="2023"
installerApp="Install Mudbox 2023.app"
installFunction
licenseFunction
#################################################
### Verify license details - not required, but kind of nice to see.
/Library/Application\ Support/Autodesk/AdskLicensing/Current/helper/AdskLicensingInstHelper list
echo "Autodesk network licensing complete"
##################################################
### Additional network license details:
### For those who are curious, or if the above ever ceases to function:
### The 'legit' method for initial silent license registration (using autoCAD as an example) uses the 'register' command instead of 'change'.
### It also requires use of the --cf flag to denote a path to the app's config (.pit) file.
### e.g.
### configFile="/Library/Application Support/Autodesk/ADLM/.config/ProductInformation.pit"
### /Library/Application\ Support/Autodesk/AdskLicensing/Current/helper/AdskLicensingInstHelper register --pk "${productKey}" --pv "${year}.0.0.F" --cf "${configFile}" --lm NETWORK --ls "${networkServer}"
### The end result is the same as the 'change' method used above (at least after the initial app launch).
### Essentially the 'change' method works backwards to manually create the licpath.lic directory & file,
### then uses the 'change' command to register it.
### Anecdotally, the 'change' method appears to produce a slightly faster initial app launch,
### but it's hard to say which is better.
### Either way, it's good to know both & having handle on the AdskLicensingInstHelper utility helps a lot!
### Check these out >>>
### /Library/Application\ Support/Autodesk/AdskLicensing/Current/helper/AdskLicensingInstHelper register --help
### /Library/Application\ Support/Autodesk/AdskLicensing/Current/helper/AdskLicensingInstHelper change --help
### Also, either method seems to deploy fine while at the login window, so no worries there.
### Some good tips & reference:
### https://knowledge.autodesk.com/support/autocad/troubleshooting/caas/sfdcarticles/sfdcarticles/Use-Installer-Helper.html
### https://knowledge.autodesk.com/search-result/caas/CloudHelp/cloudhelp/ENU/Autodesk-Installation-Basic-ODIS/files/ODIS-silent-install-htm.html
### Hope this helps some folks out!
Thanks to JonW for the script.
Posted on 06-24-2024 01:38 AM
Hello! Thank you very much, I actually replaced my script with this one and it seems to be working on my test machines. Running into some issues with sftool requiring credentials when the package is installing, so trying to sort through that. Thank you very much for your help!