AutoCAD 2021 Deployment with Network Server

Onkston
New Contributor III

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
2 ACCEPTED SOLUTIONS

Qwheel
Contributor II

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



 

View solution in original post

GabeShack
Valued Contributor III

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"

 

 

 

 

 

Gabe Shackney
Princeton Public Schools

View solution in original post

87 REPLIES 87

pitcherj
New Contributor III

What happens if you install the latest hotfix?

astrugatch
New Contributor III

Running the hot fix claims that we are running the latest version. Pulled the App out of the pkg and replaced the app in the applications folder and still get the same crashes. Tried on Catalina and Big Sur.

glennt
New Contributor II

Yes, I'm getting the exact same thing! " AutoCAD can't open. Please reinstall. One or more critical files are missing. This can happen when AutoCAD is moved to other disk" What the heck does this mean? Can't find anything on the Autodesk site - what's new!!

Qwheel
Contributor II

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



 

jbisgett
Contributor II

Thanks @Qwheel, the updated script seems to be working. 

One issue I'm having is during the standalone activation. It is prompting the user to login, then associate an account to the license. Is there a way around this step?

Don’t think so. You do it once on one machine, where it checks in against Autodesk server, then it skips the user step on every other device.
They just have to click ‘Activate’ and they’re away…

Get Outlook for iOS
-- Please click here to view our e-mail disclaimer http://www.aru.ac.uk/email-disclaimer

jbisgett
Contributor II

Thanks. I can confirm that is the case after the first installation.

GabeShack
Valued Contributor III

@jbisgett @Qwheel @pitcherj Im seeing this work correctly however one message I'm getting is this "Error (13) for adlmPITSetProductInformation_2: PRODUCTS information is not found"  This seems to be that last line which I'm not sure what thats really doing.

 

--cf /Library/Application\ Support/Autodesk/Adlm/.config/ProductInformation.Pit -el US

 

 Also just an FYI the AdskLicensing version has changed so on 2022 installer it needs to be 

 

Contents/Helper/Packages/Licensing/AdskLicensing-11.1.0.5629-mac-installer.pkg​

 

Gabe Shackney
Princeton Public Schools

GabeShack
Valued Contributor III

@Qwheel @pitcherj @jbisgett Also it looks like the remove command is not working as well as the installer is getting left behind, but perhaps that is due to the earlier error.

I just added a 2nd script to run the removal of the installer after the first script and that is working normally.

Gabe Shackney
Princeton Public Schools

GabeShack
Valued Contributor III

Well 2023 came out and I cant get it working at all.

 

After changing the script to the new version info I keep getting the message:

One or more critical files are missing. This can happen when AutoCAD is moved to other disk.

Gabe Shackney
Princeton Public Schools

Thanks for the heads up!

GabeShack
Valued Contributor III

IM considering going back to capturing the whole **bleep** install with composer again.  Then running the licensing line of code.

Gabe Shackney
Princeton Public Schools

GabeShack
Valued Contributor III

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"

 

 

 

 

 

Gabe Shackney
Princeton Public Schools

@GabeShack your script works,

I made a slight modification for distributed network as shown below

/Library/Application\ Support/Autodesk/AdskLicensing/Current/helper/AdskLicensingInstHelper register --pk "777O1" --pv "2023.0.0.F" --lm NETWORK --lt DISTRIBUTED --ls "2080@my_Lic_server1,2080@my_Lic_Server2" --sn "xxx-xxxxxxxx" --cf /Library/Application\ Support/Autodesk/Adlm/.config/ProductInformation.Pit -el US

However the only problem like 2022 version, it cannot be installed when the computer restarts, the only option is either self service or on login.

@GabeShack 
Thanks Gabe.
I tried just tried updating last years script - I think lib.pkg gets stuck at gatekeeper (according to install.log).
A "sudo xattr -dr com.apple.quarantine /" of it didn't make a difference and as you highlighted, triggering setup with the --silent option works perfectly.

rstasel
Valued Contributor

So, just wrestled with this a while, and think I finally got it. Turns out, if you uninstall the product, it leaves the licensing service running (I guess in case you have other AutoDesk products using it). So when you go to re-test after uninstalling, things don't work because it's waiting for the licensing service to spin up. 

Here's what I got working for a postinstall script. Note, with the "killall's" at the top, if any autodesk software is running on the machine, it MAY die on you if the license service is killed in the background. You may want/need to comment out those lines... 

#!/bin/bash

#Kill running Licensing service
killall AdskLicensingService
killall AdskAccessServiceHost

year="2023"
dmg="/private/tmp/Autodesk_AutoCAD_${year}_macOS.dmg"
app="Install Autodesk AutoCAD ${year} for Mac.app"
pKey="777O1"
networkServer="licenseserver.example.com"

/usr/bin/hdiutil attach "/private/tmp/Autodesk_AutoCAD_${year}_macOS.dmg" -noautoopen -nobrowse
/bin/sleep 1
"/Volumes/Installer/${app}/Contents/Helper/Setup.app/Contents/MacOS/Setup" --silent
/bin/sleep 1
/usr/bin/hdiutil detach "/Volumes/Installer"
/bin/sleep 1
/bin/rm /private/tmp/"$dmg"

/Library/Application\ Support/Autodesk/AdskLicensing/Current/helper/AdskLicensingInstHelper change --pk "${pKey}" --pv "${year}.0.0.F" --lm NETWORK --ls "${networkServer}"

 

Does this installation work without a user logged in? I have found that the latest versions of AutoCAD, last tried on 2022, does not install unless a user is logged in so when set to On Startup trigger it does not work, does your script above permit installation on startup?

 

GabeShack
Valued Contributor III

I have the students running this from self service, so yes it does require a user to be logged in. 

Gabe Shackney
Princeton Public Schools

rstasel
Valued Contributor

Hmm... while this worked installing via package directly, it doesn't seem to work via Jamf... need to figure out why. =(

Qwheel
Contributor II

I haven’t tried a silent install unattended, but it should be fine.

 

Why is everyone insisting on using the DMG though?

I packed up the PKG from inside the DMG using composer. Haven’t seen any issues 🤷‍:male_sign:

rstasel
Valued Contributor

honestly, it's just tried and true on my side. I tried with the .app and got same thing. If you just install the pkg's though, I see it just crash on start.... 

GabeShack
Valued Contributor III

Yup the old script just relied on running through the installer pkg files and the program for whatever reason didn't like that anymore.  Used to work just fine.  But as @rstasel said, we saw issues with it looking correct during the install but when the final user tried to open it, it would crash or give an error.

Gabe Shackney
Princeton Public Schools

rstasel
Valued Contributor

what just a garbage installer. I keep having it rollback because it can't start the licensing processes... which is why I had the killall's at the start, but now it's not working even with those. =/ 

what was working just running manually isn't even working at all now... so I'm completely lost. 

I used:


sudo /Library/Application\ Support/Autodesk/AdskLicensing/Current/helper/AdskLicensingInstHelper register --pk Etc

rstasel
Valued Contributor

right. I'm saying even before it gets to that stage, I'm seeing: 

2022-07-11 11:53:34-07 comp package_script_service[4344]: ./postinstall: 2022-07-11 11:53:34.972 postinstall[32309:30418943] AdskLicensingService is not running...

2022-07-11 11:53:34-07 comp package_script_service[4344]: ./postinstall: 2022-07-11 11:53:34.972 postinstall[32309:30418943] The AdskLicensingService is not ready.Try again...

 

Tries that 3 times, then gives up and rolls back the install. =/ 

rstasel
Valued Contributor

hmm, so manually starting the license service first worked. ugh... what a nightmare. 

rstasel
Valued Contributor

Package installs when run manually from a machine... fails to install when installed via jamf. 

Have you all gotten this to work via Policy called from terminal? I can't tell why it's failing because it's entirely hidden... just starts installing then nearly immediately fails and rolls back. If I run the postinstall script myself, it works. if I run the package that I built myself, it works. it just fails when being called from Jamf. =/ 

Qwheel
Contributor II

As I was planning to push it out to labs ad-hoc I thought I’d go through the process of trying an installation by check-in myself.

AutoCAD doesn’t even finish, but Maya at least exits 0 without deploying the app.

I humoured trying a:

sudo -H -u localadmin bash -c ‘install —silent etc’

Just to see if it needed a local account to dump stuff into. JAMF fed back…

 

Script result: HTTP/1.1 200
Date: Tue, 12 Jul 2022 15:35:32 GMT Content-Type: application/octet-stream Content-Length: 1091 Connection: keep-alive

Set-Cookie: JSESSIONID=E18CB6D25625DB5C71B6C04FD2559C; Path=/;

HttpOnly content-disposition: attachment; filename ={30BA09BB-CC25-3E2B-A403-C4AFB70A4D7F}.zip

checksum: a8c3818f45fa6ec23320558cdeffab05b2ffad8854dbffd013c88e5c1555 Set-Cookie: fileDownload=true; Path=/; domain=.autodesk.com;

HTTP/1.1 200 OK Accept-Ranges: bytes Content-Length: 16367718 Content-Type: application/octet-stream ETag: "5817f733cff6d92d1c1b247b709652a1655690408.4593"

Last-Modified: Mon, 20 Jun 2022 01:59:57

GMT Server: AkamaiNetStorage Date: Tue, 12 Jul 2022 15:35:35 GMT Connection: keep-alive

boost::filesystem::permissions: Operation not permitted: "/tmp"

Checksumming Protective Master Boot Record (MBR : 0)… Protective Master Boot Record (MBR :: verified CRC32 $BC5FCD8 Checksumming GPT Header (Primary GPT Header : 1)… GPT Header (Primary GPT Header : 1): verified CRC32 $A5DE0B7 Checksumming GPT Partition Data (Primary GPT Table : 2)… GPT Partition Data (Primary GPT Tabl: verified CRC32 $67A79011 Checksumming (Apple_Free : 3)… (Apple_Free : 3): verified CRC32 $00000000 Checksumming disk image (Apple_HFS : 4)… disk image (Apple_HFS : 4): verified CRC32 $FAB59D5D Checksumming (Apple_Free : 5)… (Apple_Free : 5): verified CRC32 $00000000 Checksumming GPT Partition Data (Backup GPT Table : 6)… GPT Partition Data (Backup GPT Table: verified CRC32 $67A79011 Checksumming GPT Header (Backup GPT Header : 7)… GPT Header (Backup GPT Header : 7): verified CRC32 $E2FDD81A verified CRC32 $178EC9FD /dev/disk2 GUID_partition_scheme /dev/disk2s1 Apple_HFS

/private/tmp/odis_download_dest/10239101429748123765/Darwin "disk2" ejected.

Preparing...

sudo: /Library/Application Support/Autodesk/AdskLicensing/Current/helper/AdskLicensingInstHelper: command not found

 

rstasel
Valued Contributor

This tracks with what I was seeing. it fails out because it can't install some piece. I've got a ticket in with Autodesk, but I'm assuming they're not going to be of much help. Let us know if you find any additional info... even on machines with Adsk already installed it will still fail when deployed via Jamf (seemingly)

rstasel
Valued Contributor

well, digging into ODIS logs ~/Library/Logs/Autodesk/ODIS/Setup.log, I'm seeing:

2022-07-13T08:56:52.172 [Bootstrap: 63187, 0x1191bf600] [Bootstrap INFO] [ ExecuteCommand ] Launching process: /Volumes/Installer/Install Autodesk AutoCAD 2023 for Mac.app/Contents/Helper/Setup.app/Contents/MacOS/../../../ODIS/AdODIS-installer.app --silent --install_mode install --manifest /Volumes/Installer/Install Autodesk AutoCAD 2023 for Mac.app/Contents/Helper/Setup.app/Contents/MacOS/../../../setup.xml --manifest_xsd /Volumes/Installer/Install Autodesk AutoCAD 2023 for Mac.app/Contents/Helper/Setup.app/Contents/MacOS/../../../ODIS//SetupRes/manifest.xsd --url_root https://dds.autodesk.com --installation_id f3058166-fbfa-4fc9-8966-82cc86d98a2a --install_source "/Volumes/Installer/Install Autodesk AutoCAD 2023 for Mac.app/Contents/Helper" --offline_mode --trigger_point local --installer_version 1.31.0.527
2022-07-13T08:56:52.174 [Bootstrap: 63187, 0x1191bf600] [Bootstrap ERROR] [ ExecuteCommand ] => Process failed to launch. System exit code 13
2022-07-13T08:56:52.174 [Bootstrap: 63187, 0x1191bf600] [Bootstrap INFO] [ ExecuteCommand ] Restore working directory: /Volumes/Installer/Install Autodesk AutoCAD 2023 for Mac.app/Contents/Helper/Setup.app/Contents/MacOS
2022-07-13T08:56:52.174 [Bootstrap: 63187, 0x1191bf600] [Bootstrap ERROR] [ ExecuteCommand ] => Unmapped error
2022-07-13T08:56:52.174 [Bootstrap: 63187, 0x1191bf600] [Bootstrap FATAL] [ execPostUIOperations ] ERROR! Failed to run DDA. Returned value=[ 0 ].
2022-07-13T08:56:52.174 [Bootstrap: 63187, 0x1191bf600] [Bootstrap DEBUG] [ Exit ] Exit
2022-07-13T08:56:52.174 [Bootstrap: 63187, 0x1191bf600] [Bootstrap INFO] [ TrackAdpEvent ] TrackEvent data: {"operationId":"24A48E96-A64B-4D95-8F9C-41DCCCA35BA7","operationStage":"BOOTSTRAP","operationStatus":"OP_ENDED","operationType":"install","operation_errors":{"BS_ERROR_311","BS_ERROR_706","BS_ERROR_706","BS_ERROR_706","BS_ERROR_701"},"operation_meta":{"bootstrap_error_code":"BS_ERROR_311, BS_ERROR_706, BS_ERROR_706, BS_ERROR_706, BS_ERROR_701","bootstrap_error_context":"odisver xml path does not exist###process completed with non-zero exit code: 1###process failed to launch: 13###unmapped error###failed to run DDA with exit code 0","bootstrap_execution":"fail","bootstrap_execution_time":"2.768058"},"product_meta":{"odis_session_id":"24A48E96-A64B-4D95-8F9C-41DCCCA35BA7","odis_events_category":"Bootstrap","installation_id":"f3058166-fbfa-4fc9-8966-82cc86d98a2a","target_product_name":"AutoCAD 2023 for Mac","target_product_line_name":"ACDMAC","target_product_id":"{EA0E78B5-DE74-3C81-8130-D458BFCD0C4B}","target_product_release_id":"2023"}}
2022-07-13T08:56:52.299 [Bootstrap: 63187, 0x1191bf600] [Bootstrap INFO] [ main ] Bootstrap exit code: 0

Only thing I can find about Error 13 is: https://knowledge.autodesk.com/support/autocad/learn-explore/caas/sfdcarticles/sfdcarticles/Common-F...

About calculated path too long. =/ The log is a bit of a mess though... and so far, Autodesk support hasn't been terribly useful. 

GabeShack
Valued Contributor III

I would run the uninstaller command for the year version you are using, then do a restart and try the installer script again.  My guess is something is still running that is keeping it from finishing the install.

Gabe Shackney
Princeton Public Schools

rstasel
Valued Contributor

Yeah, could be. I've been running uninstaller all along, but that doesn't remove their licensing piece, which is why I have code to unload that just in case. I'd be curious if others are able to get this working under Jamf... because like I say, works great if I install package I built as my user, or any user... but the moment it deploys with Jamf, it fails. So there's some permission/environmental variable that it wants that isn't set for user jamf agent runs under (root?)

GabeShack
Valued Contributor III

Again I am running this specific script in self service without issue.  One the few times we have seen the installer do what you are describing, a restart seemed to fix it.  The first step is packaging up the "Install Autodesk AutoCAD 2023 for Mac" installer file with composer to just throw it in the /Users/Shared folder then running this script from self service but with your serial number:

#!/bin/sh
# 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
/Users/Shared/Install\ Autodesk\ AutoCAD\ 2023\ for\ Mac.app/Contents/Helper/Setup.app/Contents/MacOS/Setup --silent
# License 2023 Version  add your serila and version here
/Library/Application\ Support/Autodesk/AdskLicensing/Current/helper/AdskLicensingInstHelper register --pk "777O1" --pv "2023.0.0.F" --lm STANDALONE --sn "YOUR SERIAL HERE" --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"

 If this fails, during the install, then a reboot is required and fixes the issue for us.  However this maybe happened only in 1 out of 25 of the installs.

Gabe Shackney
Princeton Public Schools

rstasel
Valued Contributor

If you run it just via policy in terminal (sudo jamf policy -trigger <triggerhere>) does it also work for you? 

rstasel
Valued Contributor

So, I kept reading this over and over and something you said finally stuck:

"The first step is packaging up the "Install Autodesk AutoCAD 2023 for Mac" installer file with composer to just throw it in the /Users/Shared folder then running this script from self service"

So used pkgbuild to make a package of the .app, and have it thrown into /Users/Shared. Then made a Jamf script of what you have. Policy installs the pkg, then runs the script after (rather than a post-install script on the package). 

Then realized I already had a script for doing this back in the 2021 days. lol. 

Thank you sir! 

GabeShack
Valued Contributor III

Yes except on ones that previously had a certain version installed (hence the one in 25 number) which then have to be restarted after first running this script.

Gabe Shackney
Princeton Public Schools

rstasel
Valued Contributor

same failures. =/ fails one of the steps then just backs out. reboots do nothing. there's no uninstall to run because it never gets to the step of actually installing the AutoCAD folder. =/ 

Are you installing in 12.4? Have you set any pppc policies for the installer? 

wei503
New Contributor

Hi IT admins/CAD managers,

This is Wei from Autodesk. We have received some feedbacks about the deployment issues for AutoCAD Mac. Somehow, we did not get enough info to understand the issues, so I come to post directly here.

First of all, we really don't suggest you to unpackage the AutoCAD installer app and run the pkg files inside. The recommended way is provided in this page: https://www.autodesk.com/support/download-install/admins/create-deployments/create-deployments-for-a...

If the solution above does not work for you, please kindly let me know the details including: what issue you see, and what scripts you run.

To be honest I am not familiar with jamf, but I'd like to understand what problem we have here and how we can help.

Thanks,
Wei

Qwheel
Contributor II

Hi Wei,

Currently on vacation in Greece but thought I’d return a message as it’s not often Autodesk support goes out of their way like this. So firstly, thanks very much for coming here off your own back 🙏

This is a long thread as we’ve been updating experiences for a while now.

We typically either:

produce our own flat packaged containing the Autodesk applications installer that dumps the files onto client devices.

or do the same with the DMG itself.

With installers on the client device we can run selected scripts at a ‘client check in’ (every 10/15 minutes), at log in or startup.

The whole process of deploying the installer and running a post flight script is tied into what we’d call a ‘policy’ - it’s contents being its various ‘payloads’.

We can also make such policies available in a self service application on the client device as a single button click for the end user.

In the past we’ve developed our own scripts to procedurally run the installers loose PKGs (located inside) but this year it hasn’t worked (and you’ve advised this isn’t best practice)

What is working for us (but I presume didn’t in the past) is the /setup —silent command.

What’s not working with this streamlined method is an actual unattended installation.

i.e, the policy is running successfully at login, or via self service (as a user is logged in)

the policy isn’t running at ‘check in’ when no user is logged in but the JAMF unix binary has detected the client is supposed to run the policy and attempts to use the local JAMFmanagement SU account to run the policy.

AutoCAD 2023 fails unattended.

Maya 2023 doesn’t even post an exit code, I think it gets stuck/halts when viewing ‘top’ in terminal.

The lions share of people affected by this to my knowledge are in education where administrators are looking after large labs of computers and not being able to perform unattended installations really inhibits the workflow.

There's other reports of users above having problems licensing, unlicensing and possibly updating applications… I’ll let those affected discuss this further. This issue will still affect administrators in education as staff users are issued devices that aren’t typically erased annually like lab computers.

 

Hopefully the above provides some clarity 🙌

 

 

wei503
New Contributor

Thank you very much @Qwheel for the detailed explanation and replied on your vacation. It helps a lot for me to understand where we are.

I will try to research this:
"the policy isn’t running at ‘check in’ when no user is logged in but the JAMF unix binary has detected the client is supposed to run the policy and attempts to use the local JAMFmanagement SU account to run the policy."

Do you see any error message when it fails in unattended way? Actually we fixed a bug in AutoCAD 2023, that using ssh to install AutoCAD on a remote machine when no user logged in has an error. I was hoping the problem is fixed when install AutoCAD 2023 in JAMF as well, but seems not.

I will also take some time to learn JAMF and see if i can reproduce this issue. 

Thanks again and enjoy your vacation!

Thanks,

Wei