Packaging AutoDesk applications in InTune - Updated 10/05/2024

lost_technical_analyst
Contributor

Packaging AutoDesk applications in InTune - Updated 10/05/2024

lost_technical_analyst
Contributor
Contributor

Introduction

To create a deployment package in InTune you first have to create a custom installation for a specific product in the AutoDesk portal. 
This will generate a self extracting download package that will download the application from AutoDesk, and once that's complete it will install the chosen product.

This functionality is great for an InTune package as it means we do not have to create a large package to store on our servers which the users would then download from. This method eliminates performance issues in our organisation by having the product downloaded directly from AutoDesk which improves speed and reliability.

 

Creating a custom installation package

Start off by going to the Custom Install library page and click the "Create new" button

New package_1.png


You will be presented with a licence type option as well as a list of available products that you can use.
Make sure that you select Autodesk ID and then select your required product. For this example will select AutoCad

Once you select a product you will have the option to customise it on the right hand side.
We are deploying version 2022 of AutoDesk applications as agreed by the business users and IT. To set this up, select "Specific version", select the 2022 tab and select the latest revision from the list.
Unless explicitly requested by the users, do not customise any other settings of the application at this stage.
After you have select the specific version click "Next" under the list of applications

New package_2.png



Enter a name for this deployment package so that it can easily be identified in the "Custom Install" library 

Select the "Deploy" option for the package and enter the deployment image path.
The deployment image path will be a temporary location where the self extracting tool that is being created will download all the required installation files to.
It is important to enter the location here and make a note of what you are entering as the script uses the exact file path to check the extraction process is complete.

The naming convention for the path is "{$deploymentCacheFolder}\{$productFolderName}" 
Replace {$deploymentCacheFolder} and {$productFolderName} with the name of temporary cache location and the application that you creating a package for. You will also need this later for lines 9 and 10 of the script.

Agree with the terms and conditions and download the package.

New package_3.png

 

Creating the InTune package

Now that you have the custom package downloaded you can create the InTune package

Run the downloaded package with your admin account to get the extracted contents for the installation. It may take some time depending on the size of the package.
While this is happening proceed through the next steps until you get to the installation command

Create an AutoDesk Products folder in your Intune Apps directory. This is where the AutoDesk packages will be stored.
Create a directory specific to your package and create a "Source" and "Output" folder which will be used by the InTune packaging utility.

Copy your downloaded custom package to the source folder.

You can download a copy of the example powershell script to edit to follow this guide.

 

Creating the deployment script

On line 8 of the script enter the name of the file

On line 9 of the script enter the name of your temporary cache location
On line 10 of the script enter the name of the folder used by the product which will be the sub folder within the cache location.

For example line 8 would have the name of the installer creater file.
Line 9 would be equal to the yellow highlight in the image above.

Line 10 would be equal to the blue highlight in the image above.

 

$extractorFile = "Autocad 2022 deployment.exe"
$deploymentCacheFolder = "C:\temp\Autodesk_Deployments"
$productFolderName = "Autocad"


On line 49 you need to enter the silent installation command that can be found in the batch file in the deployment image path folder that you specified.
You can "edit" the batch file so you can see the contents then copy and paste the install command into the powershell script.

You will need to split the command up into two sections
One section will be for the filepath argument
Second section will be for the argumentList argument
You can create a copy of the line below and change the values from the silent installation command in the batch file found the temp folder
If you do not use the silent command then the package will fail to install the application
Start-Process -FilePath '{Part 1}' -ArgumentList '{Part2}' -Wait

Example part 1: "C:\temp\Autodesk_Deployments\AutoCad\image\Installer.exe"
Example part 2: '-i deploy --offline_mode -q -o "C:\temp\Autodesk_Deployments\AutoCad\image\Collection.xml" --installer_version "1.39.0.165"'

 

The updated script now checks the install.bat file that is generated as part of the installation image creation.
You do not need to manually split the install string into the script it should all do it for you.

if you have issues with deploying or removing the software and already used the old version, it may be because the script you created will have hard coded installer version as a parameter and it doesn't seem to like this.

As the installer is always downloads the latest version the install command changes, so the new version of the script tries to automate this also.

The zip file containing the template scripts has been updated for ease.

Once you have completed editing the script make sure you save it.

Creating the removal script

To create the removal script, follow the same steps as previously for the deployment script.
Copy the uninstall command into the script in the same manner as you did for the deployment script

Once you have completed that step, make sure to save the script

Package creation

Make sure that you have saved both scripts and that the self extracting package is in the source folder.
Once you are happy the source contents, proceed to package the application as standard.

Configuring the package on InTune

Once your package has been created you can proceed to InTune and create a Win32 app as standard

Enter all the relevant data into the required/optional fields as you needed.

For the detection method you are free to specify any rule you like.

 

It is recommended to use the MSI product code as this would avoid conflicts between deployments such as AutoCad and AutoCad Map3D
To find the MSI product code you can navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ in the registry and look for the relevant product code based on the Display Name value which can be matched against the name that is listed in Programs and Features.


If you are unsure, install the product on your own device and check the Autodesk Folder in Program Files. If you can navigate your way through the folder structure you should be able to see the main executable for the application. You can then use the path to that executable as the detection rule.

Alternatively you can use the main application shortcut to determine the path required by the application and use the main executable portion of the shortcut as your detection method.

Once you are happy with everything, complete the package.
While you are waiting for everything to finalise on InTune, you can uninstall the application from your device using the uninstall script you created earlier.
Once that has completed, delete the deployment image path folder from C:\Temp

Test the deployment before deploying to live devices.
Hopefully you have great results.

Reply
7,217 Views
21 Replies
Replies (21)

handjonathan
Community Manager
Community Manager

Great post @lost_technical_analyst 

 

As I have mentioned this would make a wonderful Community Voice Blog Article. 



Jonathan Hand


Industry Community Manager | AEC (Architecture & Building)

district_113
Observer
Observer

I just wanted to say thank you so much for this great write up!  I can confirm that this is working for me (only tried AutoCAD so far).

lost_technical_analyst
Contributor
Contributor

No problem at all!
Glad it could help.
I've actually been having issues with the uninstall side of it.

The application uninstalls perfectly when using supersedence, however for some reason it doesn't want to uninstall when just deploying the "Uninstall" to a group.

Have you had a chance to test the uninstall directly to a group without superseding?


This was deployed to several other machines and seems to be working as expected. Perhaps just something happened to the IME service at the time of testing the uninstall.

mkravetz3KJ2R
Explorer
Explorer

This is exactly what I was looking for!  However, I have tired following your steps multiple times and running into some issues and hoping you can provide feedback, as may be misunderstanding or missing a step.

This is what I assume I should have in my source folder. I don't believe I should have anything else as we want to keep it small?

mkravetz3KJ2R_1-1687279233552.png

This is the first part of the script using your template:

#Path for installation tool
#Enter name of installation file that you downloaded
$extractorFile = 'Advance Steel 2024.exe'
#Enter name of product folder that you created in the custom package
#This is highlighted in the blue in the KI screenshot
$productFolderName = 'AdvanceSteel_2024'  

 

As is best practice I test locally via power shell before packaging for Intune, but get tons of the same exact exceptions in pink as below. but it does seem to actually extract and create the temporary locations -and despite the errors it does seem to install?

Exception calling "GetFiles" with "0" argument(s): "Could not find a part of the path 'C:\Temp\Autodesk_Deployments\AdvanceSteel_2024'."
At C:\Autodesk\AdvanceSteel_2024\Source\AS_2024_script_deploy.ps1:22 char:22
+ foreach($file in $tempDeploymentDirectory.GetFiles())
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : DirectoryNotFoundException

 

Since it does actually install, I can live with the errors but when I package it in Intune it fails immediately! I assume when packaging the source file is the deploy.ps1 . Since you did not specify, I assume the install command is: 

powershell.exe -Executionpolicy Bypass .\Autocad XXXX_Deploy.ps1
 
Would appreciate it anyone can provide feedback or perhaps instructions with some screen shots. 
Much appreciated!
 

omushahwar
Enthusiast
Enthusiast

Great write up we have tweaked our approach some and I will explain why. 

 

The default Intune File Size limit for packaged apps is 8GB to get a large upgraded file size 30GB please have your Azure Tenant Admin open a support ticket with Microsoft it may take a few days but this will help a lot for larger packages such as Revit so you dont have to create multiple apps. Revit is the only app we have seen get over 8gb
 
The basic process would be to use the Autodesk Installer to unzip/extract the files to the C:\Autodesk folder
 
Copy the extracted installation folder from its location into the Autodesk folder under Input (the folder you are packaging the Intune file from) 
Place the PowerShell Script of the install you want to package in the input folder
 
Our ps1 files end up being pretty simply.


Copy-Item -Path "Autodesk\*" -Destination "C:\Autodesk\" -Recurse -force

cmd.exe /c ""C:\Autodesk\Revit2022\Setup.exe" -q"

 
Launch powershell 
 
Cd c:\intuneSetup
IntuneWinAppUtil.exe
 
It will ask source folder: input
It will ask for Setupfile: the name of the ps1 script you are using in your input folder ie Revit2022installer.ps1 etc
It will ask for outfolder: output 

This does make larger install files but having the installation available under the C:\autodesk folder where it extracts and installs from means you have the files to run uninstall from (your computer will target the install location for the files)  The default intune folder gets cleared out on reboots after a successful attempt which is why you have issues uninstalling. 
 
the comment on MSI for detection vs location also applies to Civil3d and Autocad. 

lost_technical_analyst
Contributor
Contributor

Regarding the uninstall that is true, however when you deploy the uninstall it does the same thing..
It downloads the AutoDesk image data and then uses that to uninstall the application and clears the cache location so no files are needed on the device all the time

lost_technical_analyst
Contributor
Contributor

Hi,

Yes it seems like you may have missed a step in the setup of the application at the time of creating the installer in the AutoDesk portal. 

Your image path is C:\Autodesk\AdvanceSteel_2024\ however the script is looking at the C:\temp\AutoDesk_Deployments.


I've updated the template scripts and updated the article so if you download the new templates and set the values that match your deployment settings from the Autodesk portal it should be fine

0 Likes

jordan_springer
Community Visitor
Community Visitor

Hey, I'm running into an issue with the script_remove.ps1 script.

 

It appears the uninstall script you provided as a template is still looking for -i deploy --offline_mode in the bat file and not -i uninstall -q, so the remove script is trying to install instead of uninstall.

 

It looks like that portion of the script has been copy/pasted from the deploy script but it wasn't updated to do an uninstall. If possible, can you update the script so the correct uninstall parameters are in place?

 

If I have this all wrong please let me know!

0 Likes

lost_technical_analyst
Contributor
Contributor

You're right!!!
I didn't even notice.
Thanks for bringing this up. I have re-uploaded the amended script. Let me know if it works for you!
Appreciate you messaging about that, great spot!

0 Likes

jordan_springer
Community Visitor
Community Visitor

Thanks for getting back to me so quickly!

 

The updated removal script is failing on line 97: Start-Process -File $part1 -ArgumentList $uninstallArgs -Wait

The error is "Cannot validate argument on parameter 'FilePath'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again."

 

Perhaps this is failing because of:

 

It looks like $part1 is undefined (was this changed to $executable ?)

 

$extension_manifestXml appears to be empty, so something is going wrong when trying to split this but my PowerShell skills aren't good enough to figure it out!

0 Likes

lachlan_bunter
Observer
Observer

Hi Guys.

Here is my version. 

Overview:
This is a PowerShell script which downloads Autodesk installers from URL (retrieved using devtools) then downloads it extracts it wraps the whole lot back up as Intunewin file using the setup.exe file as the installer. It also downloads the icons from another URL all set in an initial Array. it will then add the silent install parameters and some other required settings and upload into Intune. After this it will delete all the files used in this script, so it is nice and clean. (the silent uninstall also works just need to make sure the setting is enabled in the Intune app afterwards "Allow available uninstall")

This is just using the base product installers no custom installers or packages or anything more advanced.

I have been using this for several months and works well. So far, I have only got 2022 and 2024 versions of the most popular Autodesk products.

Please Note: There is also a trigger parameter called $TestInstall if it is $true it will download it but instead of converting to intunewin it will silently install on that machine. this is used to get the msi product code. which can be done once installed using. Get-WmiObject -class Win32_Product | FT
If that parameter is $false it will not install locally just package and upload.

This PowerShell script uses 2 PowerShell Modules.

  • 7Zip4Powershell - To unzip exe files since the built in PowerShell function can't do .exe files even when renamed.
  • IntuneWin32App - PowerShell module version of the intunewin packager this module also does the uploading to Intune.

    These are the permissions I have on the app registration. (probably not all required)
    lachlan_bunter_0-1718775398661.png


    Didn't see a version as simple yet.

    Feel Free to improve on this and share back with improvements or if it has helped you.

omushahwar
Enthusiast
Enthusiast

This looks great so as new versions come out are you editing this to add the new url paths etc? 
So this auto converts your apps into intune installable apps and then you go in and specifiy who gets what in the device/user access? 

 

 

0 Likes

lachlan_bunter
Observer
Observer
Depends on what kind of update.

Either adding a superceding app (can choose to uninstall the old one or not), installing with dependency on the previous version.

So as far as uploading its pretty much the same process.

The powershell module for the upload supports supercedence, dependency and assignment i just did not use these. But could definitely be implemented for further automation.
See: MSEndpointMgr/IntuneWin32App: Provides a set of functions to manage all aspects of Win32 apps in Microsoft Intune. (github.com)<>
[https://opengraph.githubassets.com/ecad10ea7c54e563cf17b52509cbb08467203e152c0b90b07ce0ca26bba96a69/...]<>
GitHub - MSEndpointMgr/IntuneWin32App: Provides a set of functions to manage all aspects of Win32 apps in Microsoft Intune.<>
Provides a set of functions to manage all aspects of Win32 apps in Microsoft Intune. - MSEndpointMgr/IntuneWin32App
github.com

0 Likes

d_bargna
Community Visitor
Community Visitor

thanks for the post, but I'm a little confused.

 

You download the deployment package from autodesk. Is this the package that you are uploading to intune with the powershell script to do the install?

 

I think this is what you are doing, if so why do you then extract the package in your instructions? is it just to get the install cmd?

 

 

 

 

0 Likes

omushahwar
Enthusiast
Enthusiast

Sorry for the late reply we had machines that failed the extraction by extracting first we were able to control the location to place the files and not worry about the unzip process. 

Yeah it was a larger download but it hasnt failed us yet.

lachlan_bunter
Observer
Observer

Seems Autodesk has changed how the download URLs work shortly after my post so now it is broken as it downloads a installer to then create the packages rather than downloading the packages themselves now.

After all this still no way to support a proper install from Intune and now blocking people's workarounds.

Seems like time to look into alternatives.

0 Likes

lost_technical_analyst
Contributor
Contributor

The new way that you are referring to is covered by my article. You don't need to seek another solution when a working one is already outlined.
My solution allows you to just package the installer creation tool so then you have access to all files/folders within the installer to manipulate as you see fit.
It also gives you programmatic access to the installation script as well as the uninstall script to remove all the components that are left behind after an uninstall.


Happy packaging

Simon_Weel
Advisor
Advisor

Is it possible to pin this post?

0 Likes

lost_technical_analyst
Contributor
Contributor

I'm sorry, I'm not the best on these forums.
Should I try to pin it somehow is that for AutoDesk admin to do?

0 Likes