Posted on 06-11-2020 05:14 AM
Hey All,
This year Autodesk decided to change the installer for AutoCAD, Maya and Mudbox. Here's how I got AutoCAD to install silently since the new silent installer option is broken. You will want a policy to copy the app from the dmg to a temp directory. I used /tmp
EDIT: You only want to change the license server address in the script below. Nothing else.
#!/bin/sh
year="2021"
pkgpath="/tmp/Install Autodesk AutoCAD ${year} for Mac.app"
pkgPath1="/tmp/Install Autodesk AutoCAD ${year} for Mac.app/Contents/Helper/ObjToInstall/lib.pkg"
pkgPath2="/tmp/Install Autodesk AutoCAD ${year} for Mac.app/Contents/Helper/Packages/AdSSO/AdSSO-v2.pkg"
pkgPath3="/tmp/Install Autodesk AutoCAD ${year} for Mac.app/Contents/Helper/Packages/Licensing/AdskLicensing-10.1.0.3194-mac-installer.pkg"
pkgPath4="/tmp/Install Autodesk AutoCAD ${year} for Mac.app/Contents/Helper/ObjToInstall/licreg.pkg"
pkgPath5="/tmp/Install Autodesk AutoCAD ${year} for Mac.app/Contents/Helper/ObjToInstall/autocad2021.pkg"
pKey="777M1"
networkServer="LICENSE SERVER ADDRESS"
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 /
}
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}"
}
#Run script
runInstaller
createLicenseFiles
licenceHelper
cleanUp
Solved! Go to Solution.
Posted on 08-18-2021 02:07 AM
Just weighing in for others. As we have a bunch of Macbooks within our institution, I had to package up the 2022 standalone versions for CAD and Maya.
I used the script proposed above by others but found the license section wasn't flawless. I suspect it's because spaces weren't escaped (I'm looking at you "Application\ Support").
When problem solving why licensing wasn't working, I tinkered a fair bit (adding "", sudo, \ etc) . Actually wasn't sure if /.config was even there but it was hidden (as .folders are...) .
But yeah, as I used the above scripts, I thought I'd show my CAD and Maya standalone 2022 corrections and share my experience getting it working.
#!/bin/sh
year="2022"
pkgpath="/private/tmp/Install Autodesk AutoCAD ${year} for Mac.app"
pkgPath1="/private/tmp/Install Autodesk AutoCAD ${year} for Mac.app/Contents/Helper/ObjToInstall/lib.pkg"
pkgPath2="/private/tmp/Install Autodesk AutoCAD ${year} for Mac.app/Contents/Helper/Packages/AdSSO/AdSSO-v2.pkg"
pkgPath3="/private/tmp/Install Autodesk AutoCAD ${year} for Mac.app/Contents/Helper/Packages/Licensing/AdskLicensing-11.0.0.4854-mac-installer.pkg"
pkgPath4="/private/tmp/Install Autodesk AutoCAD ${year} for Mac.app/Contents/Helper/ObjToInstall/LicregTool/licreg.pkg"
pkgPath5="/private/tmp/Install Autodesk AutoCAD ${year} for Mac.app/Contents/Helper/ObjToInstall/autocad2022.pkg"
pKey="XXXXX"
sn="XXX-XXXXXXXX"
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 /
}
licenceHelper ()
{
#/Library/Application\ Support/Autodesk/AdskLicensing/Current/helper/AdskLicensingInstHelper register --pk "${pKey}" --pv "${year}.0.0.F" --lm STANDALONE --sn "${sn}" --cf /Library/Application Support/Autodesk/Adlm/.config/ProductInformation.Pit -el US
sudo /Library/Application\ Support/Autodesk/AdskLicensing/Current/helper/AdskLicensingInstHelper register --pk "XXXXX" --pv "2022.0.0.F" --lm STANDALONE --sn "XXX-XXXXXXX" --cf /Library/Application\ Support/Autodesk/Adlm/.config/ProductInformation.Pit -el US
}
cleanUp ()
{
/bin/rm -rf "${pkgPath}"
}
#Run script
runInstaller
licenceHelper
cleanUp
And for Maya, I found that the Autodesk build couldn't install MtoA (Arnold renderer). Don't know why it was failing but MacOS version was 11.5.X.
Excluded that line from the installer and went to their website. Using Composer, I dumped the PKG next to the Maya installer in /tmp and ran it from there in the order previously described.
Apologies for not having done the housekeeping to tidy it up, but I consider it useful to see what has been removed.
#!/bin/sh
year="2022"
pkgpath="/tmp/Install Maya ${year}.app"
helperpath="${pkgpath}/Contents/Helper"
pkgPath1="${helperpath}/Packages/Licensing/AdskLicensing-11.0.0.4854-mac-installer.pkg"
pkgPath2="${helperpath}/Packages/AdSSO/AdSSO-v2.pkg"
pkgPath3="${helperpath}/Packages/Maya/Maya_AdLMconf2022.pkg"
pkgPath4="${helperpath}/Packages/Maya/Maya_core2022.pkg"
#pkgPath5="${helperpath}/Packages/Maya/MtoA.pkg"
pkgPath6="${helperpath}/Packages/Maya/bifrost.pkg"
pkgPath7="${helperpath}/Packages/Maya/MayaUSD.pkg"
pkgPath8="${helperpath}/Packages/Maya/SubstanceInMaya-2.1.9-2022-Darwin.pkg"
pkgPath9="${helperpath}/Packages/Maya/motion-library.maya2022-2.0.0.pkg"
PkgPathA="${helperpath}/Packages/Maya/Pymel2022.pkg"
pKey="XXXXX"
networkServer="YOUR LICENSE SERVER NAME HERE"
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 "/private/tmp/MtoA-4.2.4-darwin-2022.pkg" -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 /
/usr/sbin/installer -verboseR -pkg "${pkgPathA}" -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 ()
{
sudo /Library/Application\ Support/Autodesk/AdskLicensing/Current/helper/AdskLicensingInstHelper register --pk "XXXXX" --pv "2022.0.0.F" --lm STANDALONE --sn "XXX-XXXXXX" --cf /Library/Application\ Support/Autodesk/ADLM/PIT/2022/MayaConfig.pit -el US
}
cleanUp ()
{
/bin/rm -rf "${pkgPath}"
}
#Run script
runInstaller
#createLicenseFiles
licenceHelper
cleanUp
04-01-2022 12:56 PM - edited 04-01-2022 01:08 PM
Ok all looks like I got this all working again, but slightly different. 2 things....just remember to enter your own SN and product ID for the x's and also make a pkg with composer that puts the 2023 installer in /Users/Shared but this is working great now.
#!/bin/sh
# Adapted By GabeShack
# Remove 2021 version
/Applications/Autodesk/AutoCAD\ 2021/Remove\ AutoCAD\ 2021.app/Contents/MacOS/Remove\ AutoCAD\ 2021 -silent
# Remove 2022 version
/Applications/Autodesk/AutoCAD\ 2022/Remove\ AutoCAD\ 2022.app/Contents/MacOS/Remove\ AutoCAD\ 2022 -silent
# Remove 2023 version
/Applications/Autodesk/AutoCAD\ 2023/Remove\ AutoCAD\ 2023.app/Contents/MacOS/Remove\ AutoCAD\ 2023 -silent
# Install Silently (Requires Autodesk 2023 Installer to be in /Users/Shared)
/Users/Shared/Install\ Autodesk\ AutoCAD\ 2023\ for\ Mac.app/Contents/Helper/Setup.app/Contents/MacOS/Setup --silent
# License 2023 Version add your sn and version for the X's
/Library/Application\ Support/Autodesk/AdskLicensing/Current/helper/AdskLicensingInstHelper register --pk "XXXXX" --pv "2023.0.0.F" --lm STANDALONE --sn "xxx-xxxxxxx" --cf /Library/Application\ Support/Autodesk/Adlm/.config/ProductInformation.Pit -el US
# Remove 2021, 2022 and 2023 installer files
rm -rf "/Users/Shared/Install Autodesk AutoCAD 2021 for Mac.app"
rm -rf "/Users/Shared/Install Autodesk AutoCAD 2022 for Mac.app"
rm -rf "/Users/Shared/Install Autodesk AutoCAD 2023 for Mac.app"
Posted on 06-16-2020 01:31 PM
I have a few questions. I tried to use this script, but I was unsuccessful. I could get the PKGs to install fine, but not the license parts. What is the pKey variable? Where did you get the 777M1 value from? I know what to put for our license server in the networkServer variable, but I'm not sure if I need to change the licFile and lgsFile values?
Posted on 06-17-2020 09:19 AM
@CooperUser
The pKey is the Product key for the Software and changes every year. A mostly complete list of 2021 Product Keys is available from Autodesk here: Here's the 2021 keys: https://knowledge.autodesk.com/customer-service/download-install/activate/find-serial-number-product-key/product-key-look/2021-product-keys
The only thing you need to change is the network server variable. The other variables need to stay the same.
What is the error you are getting?
Posted on 06-17-2020 10:10 AM
edit buttons are helpful.
Posted on 06-18-2020 09:56 AM
Hey Ohkston. Thanks for the response. I got your script to work finally. I don't remember the error. I think the problem I was really encountering was that the licreg.pkg was failing to install. I think this was because I had previously installed and uninstalled AutoCAD 2021 to test another solution. I fixed this by removing all the AutoCAD files on the machine and restarting. Restarting was really the key to getting the licreg.pkg to not fail for some reason. I wish I could be more exact. Thank you so much for this helpful script.
Posted on 06-22-2020 02:45 AM
At my office we don't have a Autocad network licence server, but the end users login with their username (e-mailadres) and password. Anyone knows how to change that in this script? Appreciate
EDIT!!
Changed the script by cutting some items..
Posted on 06-22-2020 03:40 AM
Here is the changed script:
#!/bin/sh
year="2021"
pkgpath="/tmp/Install Autodesk AutoCAD ${year} for Mac.app"
pkgPath1="/tmp/Install Autodesk AutoCAD ${year} for Mac.app/Contents/Helper/ObjToInstall/lib.pkg"
pkgPath2="/tmp/Install Autodesk AutoCAD ${year} for Mac.app/Contents/Helper/Packages/AdSSO/AdSSO-v2.pkg"
pkgPath3="/tmp/Install Autodesk AutoCAD ${year} for Mac.app/Contents/Helper/Packages/Licensing/AdskLicensing-10.1.0.3194-mac-installer.pkg"
pkgPath4="/tmp/Install Autodesk AutoCAD ${year} for Mac.app/Contents/Helper/ObjToInstall/licreg.pkg"
pkgPath5="/tmp/Install Autodesk AutoCAD ${year} for Mac.app/Contents/Helper/ObjToInstall/autocad2021.pkg"
pKey="777M1"
networkServer="LICENSE SERVER ADDRESS"
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 /
}
cleanUp ()
{
/bin/rm -rf "${pkgPath}"
}
#Run script
runInstaller
cleanUp
Posted on 06-26-2020 06:32 AM
Wow!!! This is great work. Had several arguments with Autodesk to get AutoCAD installation. How would this apply to distributed Servers? In my case I have two autodesk servers...
Posted on 07-02-2020 01:11 PM
Hello,
Thanks for this @Onkston!
Have you figured out, by chance, how to run the 2020.0.1 combo update in conjunction with this?
I'd hate to have to go back to the snapshot capture-and-diff method just to get this in there, but I also hate to not deploy the latest version.
I tried running the hotfix installer with a command similar to /usr/sbin/installer -verboseR -pkg "${pkgPath5}" -target /, modifing appropriately with the path to the installer, and also tried adding -allowUntrusted, but no dice - simply reports the generic error when a pkg install fails.
Thoughts?
Thanks!
Jacob
Posted on 07-14-2020 12:50 PM
How would this differ if we were using the standalone license versus a network license?
Posted on 07-14-2020 01:30 PM
That's a good question.
If it's a single serial number per copy of the product, you'll likely just leave out all of the network-related stuff, but then you'll have to enter the serial number manually on each computer.
I'm sure there is a way to meter out the serial numbers one way or another, but it may be more effort than it's worth (if your number of seats is relatively low, you probably just want to install from Jamf and license separately.
Posted on 07-14-2020 01:45 PM
It's a single serial number for multiple installs.
Posted on 08-11-2020 12:17 PM
The AdskLicensingInstHelper tool in /Library/Application Support/Autodesk/AdskLicensing/Current/helper/
has a flag to imput a serial number.
-sn 000-00000000
Posted on 08-11-2020 12:50 PM
https://knowledge.autodesk.com/support/autocad/learn-explore/caas/sfdcarticles/sfdcarticles/Use-Installer-Helper.html
Posted on 08-11-2020 01:02 PM
After some research, I was able to modify the script posted here to suit my needs. I have it as a postinstall script on my Composer package.
#!/bin/sh
year="2021"
pkgpath="/private/tmp/Install Autodesk AutoCAD ${year} for Mac.app"
pkgPath1="/private/tmp/Install Autodesk AutoCAD ${year} for Mac.app/Contents/Helper/ObjToInstall/lib.pkg"
pkgPath2="/private/tmp/Install Autodesk AutoCAD ${year} for Mac.app/Contents/Helper/Packages/AdSSO/AdSSO-v2.pkg"
pkgPath3="/private/tmp/Install Autodesk AutoCAD ${year} for Mac.app/Contents/Helper/Packages/Licensing/AdskLicensing-10.1.0.3194-mac-installer.pkg"
pkgPath4="/private/tmp/Install Autodesk AutoCAD ${year} for Mac.app/Contents/Helper/ObjToInstall/licreg.pkg"
pkgPath5="/private/tmp/Install Autodesk AutoCAD ${year} for Mac.app/Contents/Helper/ObjToInstall/autocad2021.pkg"
pKey="777M1"
sn="000-00000000"
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 /
}
licenceHelper ()
{
/Library/Application Support/Autodesk/AdskLicensing/Current/helper/AdskLicensingInstHelper register --pk "${pKey}" --pv "${year}.0.0.F" --lm 3 --sn "${sn}" --cf /Library/Application Support/Autodesk/Adlm/.config/ProductInformation.Pit -el US
}
cleanUp ()
{
/bin/rm -rf "${pkgPath}"
}
#Run script
runInstaller
licenceHelper
cleanUp
Posted on 08-12-2020 09:07 AM
@jbisgett: Thanks!
I just modified the --lm option in the licencehelper part to:
[…]
/Library/Application Support/Autodesk/AdskLicensing/Current/helper/AdskLicensingInstHelper register --pk "${pKey}" --pv "${year}.0.0.F" --lm STANDALONE --sn "${sn}" --cf /Library/Application Support/Autodesk/Adlm/.config/ProductInformation.Pit -el US
[…]
Now you won't get prompted for the license type when opening AutoCAD 2021 for the first time.
I also had to repackage the updater package 24.0.46.1761 (AutoCAD 2021.0.1) because the original pkg file can not be deployed either.
Also interesting: "AutoCAD for Mac and AutoCAD LT for Mac do not support network deployment.“ ;-)
Posted on 08-12-2020 09:13 AM
What kinda magic did you apply to repackaging the updater?
Posted on 08-12-2020 09:23 AM
Here is my script that downloads and installs the updater (someone else figured out the symbolic link issue).
# Download and install the 2021.0.1 hotfix
# For some reason we have to create a directory and symbolic link in /private/tmp before we can install the hotfix
# https://www.jamf.com/jamf-nation/discussions/34668/deploying-autocad-2020-using-script
# Look for VerTarget.plist in the hotfix package. Locate UpdateVersion and use that below
UpdateVersion="24.0.46.1761"
# Make sure there is no existing directory.
if [[ -d /private/tmp/_adsk_${UpdateVersion} ]]; then
rm -R /private/tmp/_adsk_${UpdateVersion}
fi
mkdir -p /private/tmp/_adsk_${UpdateVersion}
ln -s /Applications/Autodesk/AutoCAD 2021/AutoCAD 2021.app /private/tmp/_adsk_${UpdateVersion}/acupdt_rone
# Actually download and install the 2021.0.1 hotfix
tmpDir=$(mktemp -d)
echo "Temp dir set to ${tmpDir}"
dmgName="AutoCAD_Mac_2021.0.1_Hotfix_Combo.dmg"
pkgName="AutoCAD_Mac_2021.0.1_Hotfix_Combo.pkg"
dmgVolumePath="/Volumes/R046.M.1761.acad.mac.x64.comboupdate"
downloadUrl="https://up.autodesk.com/2021/ACDMAC/47A46D13-5C55-4D3A-88D3-EF091F79068B"
curl -LSs "${downloadUrl}/${dmgName}" -o "${tmpDir}/${dmgName}"
hdiutil attach "${tmpDir}/${dmgName}" -nobrowse
installer -pkg "${dmgVolumePath}/${pkgName}" -target /
hdiutil detach "${dmgVolumePath}"
rm -f "${tmpDir}/${dmgName}"
Edit: swapped /tmp for an mktemp created temp dir
Posted on 08-12-2020 10:32 AM
The AutoCAD 2021.0.1 Hotfix Combo just replaces the following 4 files in /Applications/Autodesk/AutoCAD 2021/ :
I extracted those files with Pacifist.app from the original 2021.0.1 updater and repackaged them with Composer.app as follows:
Posted on 08-12-2020 10:37 AM
I found a typo on line 3 of your postinstall script:
[…]
pkgpath="/private/tmp/Install Autodesk AutoCAD ${year} for Mac.app"
[…]
cleanUp ()
{
/bin/rm -rf "${pkgPath}"
}
[…]
The variable "pkgpath" needs a capital P -> "pkgPath" - otherwise the installer app "Install Autodesk AutoCAD 2021 for Mac.app" won't be deleted in /private/tmp after the installation (the cleanUp part doesn't work).
Posted on 08-31-2020 11:01 AM
Another great script.
It occurs to me that Year and pKey could be coded as variables in the script and added in the policy. I might have to do that locally.
Posted on 01-04-2021 10:57 PM
FORGET THIS IDEA DOES NOT WORK AS A JAMF PUSH!
Thought this might help someone only have tested this on macOS 11.0.1
#!/bin/bash
BASEDMG="Autodesk_AutoCAD_2021.1_macOS.dmg"
# Licence info:
PRODUCTION_KEY="777M1"
PRODUCTION_VER="2021.0.0.F"
# Mount DMG
hdiutil attach $BASEDMG
# Install AutoCAD 2021
/Volumes/Installer/Install Autodesk AutoCAD 2021 for Mac.app/Contents/Helper/Setup.app/Contents/MacOS/Setup --silent
# Unmount DMG
hdiutil detach /Volumes/Installer
# Licence AutoCAD 2021
/Library/Application Support/Autodesk/AdskLicensing/Current/helper/AdskLicensingInstHelper change --prod_key $PRODUCTION_KEY --prod_ver $PRODUCTION_VER --lic_method "NETWORK" --lic_server_type "SINGLE" --lic_servers "my.Licserver.com"
Used Whitebox Packages and added this as the postinstall script and the dmg into the Scripts "Additional Resources"
Note make sure you change the licence server to point to your licence server. ;)
Also should be able to make this work with a serial key as well you will just need to play with the Licence AutoCAD 2021 line
Posted on 05-20-2021 01:18 AM
Is there a version of this script for Maya and Mudbox 2022? As I'll be needing to deploy those soon. Was trying to use the Autodesk installer to do it but I see someone said in this thread that it's broken, is that still the case?
Posted on 05-27-2021 10:39 AM
I’m packaging up the 2022 versions over the next week. I’ll let ya know how it goes.
Posted on 06-02-2021 02:00 AM
@Onkston how are your packaging efforts coming along?
Posted on 06-02-2021 07:21 AM
2022 still has the same limitation where the --silent
flag doesn't work if no user is logged in.
Posted on 06-03-2021 12:34 AM
@cbrewer so for Maya and Mudbox I just need to use the script in the opening post but with "AutoCAD" replaced with "Maya" or "Mudbox" as appropriate and the year and pkey variables changed as appropriate, is that correct? EDIT: oh and I guess I need to modify pkgpath5 too? EDIT 2: actually it looks like I basically need to look at the Maya XML manifests and plug in the pkg paths in sequence as required, the layout seems considerably different from what's mentioned in the OP for AutoCAD.
Posted on 06-03-2021 02:17 AM
Following on from my previous post, I've had some success with the following scripts, modified from the one in the opening post.
For Maya 2022:
#!/bin/sh
year="2022"
pkgpath="/tmp/Install Maya ${year}.app"
helperpath="${pkgpath}/Contents/Helper"
pkgPath1="${helperpath}/Packages/Licensing/AdskLicensing-11.0.0.4854-mac-installer.pkg"
pkgPath2="${helperpath}/Packages/AdSSO/AdSSO-v2.pkg"
pkgPath3="${helperpath}/Packages/Maya/Maya_AdLMconf2022.pkg"
pkgPath4="${helperpath}/Packages/Maya/Maya_core2022.pkg"
pkgPath5="${helperpath}/Packages/Maya/MtoA.pkg"
pkgPath6="${helperpath}/Packages/Maya/bifrost.pkg"
pkgPath7="${helperpath}/Packages/Maya/MayaUSD.pkg"
pkgPath8="${helperpath}/Packages/Maya/SubstanceInMaya-2.1.9-2022-Darwin.pkg"
pkgPath9="${helperpath}/Packages/Maya/motion-library.maya2022-2.0.0.pkg"
PkgPathA="${helperpath}/Packages/Maya/Pymel2022.pkg"
pKey="YOUR MAYA PRODUCT KEY HERE"
networkServer="YOUR LICENSE SERVER NAME HERE"
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 /
/usr/sbin/installer -verboseR -pkg "${pkgPathA}" -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}"
}
#Run script
runInstaller
createLicenseFiles
licenceHelper
cleanUp
For Mudbox 2022:
#!/bin/sh
year="2022"
pkgpath="/tmp/Install Mudbox ${year}.app"
helperpath="${pkgpath}/Contents"
pkgPath1="${helperpath}/Packages/ADLM/AdskLicensing-11.0.0.4854-mac-installer.pkg"
pkgPath2="${helperpath}/Packages/ADLM/AdSSO-v2.pkg"
pkgPath3="${helperpath}/Packages/Mudbox/Mudbox_AdLMconf2022.pkg"
pkgPath4="${helperpath}/Packages/Mudbox/Mudbox_core2022.pkg"
pKey="YOUR MUDBOX PRODUCT KEY HERE"
networkServer="YOUR LICENSE SERVER NAME HERE"
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 /
}
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}"
}
#Run script
runInstaller
createLicenseFiles
licenceHelper
cleanUp
Posted on 07-21-2021 05:40 AM
Thanks for these, they were a good starting point but I found a few issues
As such my final scripts were as follows:
Maya 2022
#!/bin/sh
year="2022"
pkgpath="/tmp/Install Maya ${year}.app"
pKey="657N1"
networkServer="server"
licPath="/Library/Application Support/Autodesk/AdskLicensingService/${pKey}_${year}.0.0.F"
licFile="licpath.lic"
helperpath="${pkgpath}/Contents/Helper"
pkgPath1="${helperpath}/Packages/Licensing/AdskLicensing-11.0.0.4854-mac-installer.pkg"
pkgPath2="${helperpath}/Packages/AdSSO/AdSSO-v2.pkg"
pkgPath3="${helperpath}/Packages/Maya/Maya_AdLMconf2022.pkg"
pkgPath4="${helperpath}/Packages/Maya/Maya_core2022.pkg"
pkgPath5="${helperpath}/Packages/Maya/MtoA.pkg"
pkgPath6="${helperpath}/Packages/Maya/bifrost.pkg"
pkgPath7="${helperpath}/Packages/Maya/MayaUSD.pkg"
pkgPath8="${helperpath}/Packages/Maya/SubstanceInMaya-2.1.9-2022-Darwin.pkg"
pkgPath9="${helperpath}/Packages/Maya/motion-library.maya2022-2.0.0.pkg"
PkgPathA="${helperpath}/Packages/Maya/Pymel2022.pkg"
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 /
/usr/sbin/installer -verboseR -pkg "${pkgPathA}" -target /
}
createLicenseFiles ()
{
if [[ ! -e "${licPath}" ]];
then
/bin/mkdir "${licPath}"
fi
/usr/bin/touch "${licPath}/${licFile}"
/bin/chmod 777 "${licPath}/${licFile}"
/bin/echo "SERVER ${networkServer} 000000000000 " > "${licPath}/${licFile}"
/bin/echo "USE_SERVER\c" >> "${licPath}/${licFile}"
}
runInstaller
createLicenseFiles
/Library/Application\ Support/Autodesk/AdskLicensing/Current/helper/AdskLicensingInstHelper change --pk "${pKey}" --pv "${year}.0.0.F" --lm NETWORK --ls "${networkServer}"
/bin/rm -rf "${pkgPath}"
Mudbox 2022
#!/bin/sh
year="2022"
pkgpath="/tmp/Install Mudbox ${year}.app"
pKey="498N1"
networkServer="server"
licPath="/Library/Application Support/Autodesk/AdskLicensingService/${pKey}_${year}.0.0.F"
licFile="licpath.lic"
helperpath="${pkgpath}/Contents"
pkgPath1="${helperpath}/Packages/ADLM/AdskLicensing-11.0.0.4854-mac-installer.pkg"
pkgPath2="${helperpath}/Packages/ADLM/AdSSO-v2.pkg"
pkgPath3="${helperpath}/Packages/Mudbox/Mudbox_AdLMconf2022.pkg"
pkgPath4="${helperpath}/Packages/Mudbox/Mudbox_core2022.pkg"
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 /
}
createLicenseFiles ()
{
if [[ ! -e "${licPath}" ]];
then
/bin/mkdir "${licPath}"
fi
/usr/bin/touch "${licPath}/${licFile}"
/bin/chmod 777 "${licPath}/${licFile}"
/bin/echo "SERVER ${networkServer} 000000000000 " > "${licPath}/${licFile}"
/bin/echo "USE_SERVER\c" >> "${licPath}/${licFile}"
}
runInstaller
createLicenseFiles
/Library/Application\ Support/Autodesk/AdskLicensing/Current/helper/AdskLicensingInstHelper change --pk "${pKey}" --pv "${year}.0.0.F" --lm NETWORK --ls "${networkServer}"
/bin/rm -rf "${pkgPath}"
Posted on 06-03-2021 10:59 AM
Been trying script by Onkston with Autodesk 2022 with a script updated as appropriate... (year=2022, AdskLicensing-11.0.0.4854-mac-installer.pkg, etc...). All seems to run fine but at the end get this:
installer: The install was 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
AdskLicensingService.data is indeed not being create. When manually installing this file is created as well as this file: AdskLicensingService.sds
When trying to run AutoCAD it tries to open but then soon crashes.
Any suggestions welcome. Much appreciated!
Posted on 06-03-2021 11:35 AM
Update to my previous post... nevermind the AdskLicensingService.data not being created. It works fine on a clean machine... it just wasn't working on my test computer with multiple install attempts.
AutoCAD 2022, however, still will not run. Manually installing works just fine. Not sure what is missing. I'll comb the logs.
BTW - this is on Big Sur 11.3.1
Posted on 06-03-2021 02:51 PM
@tcaldana I am seeing the same thing when trying to install 2022 using the individual packages.
Posted on 06-07-2021 10:03 AM
For those interested, I was able to successfully install AutoCAD 2022.
I dump my temporary install files in /usr/local/etc/JamfInstallers/{PRODUCTNAME} so feel free to modify this path to suit your needs.
I created a PKG in composer that dumps the "Install Autodesk AutoCAD 2022 for Mac.app" file from the vendor-supplied DMG into that path.
Here's my script (modified from above posts):
#!/bin/sh
year="2022"
pkgpath="/usr/local/etc/JamfInstallers/AutoCAD_2022/Install Autodesk AutoCAD ${year} for Mac.app"
pkgPath1="/usr/local/etc/JamfInstallers/AutoCAD_2022/Install Autodesk AutoCAD ${year} for Mac.app/Contents/Helper/ObjToInstall/lib.pkg"
pkgPath2="/usr/local/etc/JamfInstallers/AutoCAD_2022/Install Autodesk AutoCAD ${year} for Mac.app/Contents/Helper/Packages/AdSSO/AdSSO-v2.pkg"
pkgPath3="/usr/local/etc/JamfInstallers/AutoCAD_2022/Install Autodesk AutoCAD ${year} for Mac.app/Contents/Helper/Packages/Licensing/AdskLicensing-11.0.0.4854-mac-installer.pkg"
pkgPath4="/usr/local/etc/JamfInstallers/AutoCAD_2022/Install Autodesk AutoCAD ${year} for Mac.app/Contents/Helper/ObjToInstall/LicregTool/licreg.pkg"
pkgPath5="/usr/local/etc/JamfInstallers/AutoCAD_2022/Install Autodesk AutoCAD ${year} for Mac.app/Contents/Helper/ObjToInstall/autocad2022.pkg"
pKey="777N1"
networkServer="YOUR.NETWORK.LICENSE.SERVER.HERE"
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 /
}
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}"
}
#Run script
runInstaller
createLicenseFiles
licenceHelper
cleanUp
Additionally, I have a second package in there consisting of "AutoCAD_Mac_2022.1_Update_Combo.pkg" from the 2022.1 combo update downloaded through the "Check for updates" menu item in the product. This is set to "Cache" so that it goes into the waiting room folder.
Then I call an execute command action (under files and processes) in my policy which is the last thing to run, that installs this combo update over top of the base product:
/usr/sbin/installer -pkg /Library/Application Support/JAMF/Waiting Room/AutoCAD_Mac_2022.1_Update_Combo.pkg -target /
Posted on 06-07-2021 03:09 PM
@pitcherj Are you positive AutoCAD 2022 opens and you can start a drawing project after deploying with that method (individual packages)?
What I am finding is that it will install successfully, but it's not actually usable. The only way I end up with a usable install is by calling Setup
with the --silent
switch. The downside of that method is that a user has to be logged in.
I also think that manually creating a licpath.lic is no longer needed as AdskLicensingInstHelper
takes care of the licensing. But I could be wrong on that.
Posted on 06-07-2021 03:24 PM
Yup, worked on a separate machine too.
Once I finish the first round of testing I'll rebuild the machine and test again.
Also noticed the lgs file is apparently no longer needed either?
Posted on 06-16-2021 01:26 PM
First, I want to thank @DanJ_LRSFC for the Maya 2022 script. It works 98%, however, I did notice one small error installing Pymel2022.pkg -- you declared it as variable "PkgPathA" but try to install it with variable "pkgPathA" and it craps out because of the difference in the capital P vs. lowercase P.
Also, it isn't deleting the *.app file from /tmp because you declared variable "pkgpath" but then call "pkgPath" in the cleanUp function.
I have verified that after fixing both of those issues, Maya 2022 installs perfectly, licenses itself, and deletes the *.app from /tmp after finishing the installation.
Posted on 06-17-2021 10:34 AM
Just wanted to confirm @cbrewer modified script and workflow by @pitcherj is working great. Only change I made is that I used /tmp instead of /usr/local/etc/JamfInstallers/AutoCAD_2022
Initially AutoCAD installed fine but was crashing after a couple minutes. Applying the 2022.1 update fixed all that. Appreciate learning and applying the Cache/Waiting room technique to install that.
Thanks all!
Posted on 06-29-2021 08:27 PM
@Onkston Have you had much luck automating the installation of AutoCAD 2022? If so, was it on a system that previously had AutoCAD 2021 installed?
Posted on 06-29-2021 08:28 PM
@cbrewer I'm also having trouble MacGyvering an automated, unattended, non-logged-in installation of AutoCAD 2022. Have you had any luck? Since others in this thread have reported success, I'm starting to think my issues might be related to a previous installation of AutoCAD 2021. I suspect I've removed every trace of it, but maybe not...? Any data you can offer would be much appreciated.
Posted on 08-03-2021 09:02 AM
Using your variation on the script (and modifying ones above) and keep running into the issue that the app appears to install fine, the network license is seen and is working, but once the applications is running and starting a template crashes the app. Is anyone else seeing this?
Manually installing does not have this result.