Package AutoCAD 2023.1.2
Published: Dec 2, 2022 - 4:23 PM
I'm sharing my software package with you AutoCAD 2023 network license.
Since version 2023, you need to create your custom installation from your Autodesk account.
In my case, I created a custom image to install, not to deploy from a deployment image
Once the AutoCAD2023.exe file has been downloaded and run, cancel the installation on the dev machine and retrieve the image folder in c:\Autodesk\{GUID} to copy it to the root of the package.
It is crucial not to modify the user registry before the software is run for the first time; hence the use of the audit function to disable telemetry
The run command of the uninstall function should accept error code 1603 due to an uninstallable patch: https://learn.microsoft.com/en-us/windo ... le-patches
control file:
setup.py file:
Since version 2023, you need to create your custom installation from your Autodesk account.
Once the AutoCAD2023.exe file has been downloaded and run, cancel the installation on the dev machine and retrieve the image folder in c:\Autodesk\{GUID} to copy it to the root of the package.
control file:
Code: Select all
depends : wapt-vcredist2012
audit_schedule : 5
Code: Select all
# -*- coding: utf-8 -*-
from setuphelpers import *
import platform
try:
from waptenterprise.waptservice.enterprise import get_active_sessions, start_interactive_process
except:
from waptservice.enterprise import get_active_sessions, start_interactive_process
"""
Usable WAPT package functions: install(), uninstall(), session_setup(), audit(), update_package()
"""
# Declaring global variables - Warnings: 1) WAPT context is only available in package functions; 2) Global variables are not persistent between calls
def install():
# Installing the software
install_exe_if_needed('image\Installer.exe',silentflags="-i deploy --offline_mode --ui_mode silent -o image\Collection.xml",key="{423E5E4A-E412-31C8-94B8-7A1171D35541}",min_version=control.get_software_version(),timeout=900)
uninstallkey.remove('{423E5E4A-E412-31C8-94B8-7A1171D35541}')
# Uninstalling Autodesk desktop application because update will be manage with wapt
print('Uninstalling Application de bureau Autodesk')
killalltasks("AdAppMgr.exe")
killalltasks("Autodeskdesktopapp.exe")
service_stop("AdAppMgrSVC")
remove_tree(r'%s\Autodesk\SDS' % programdata)
run(r'"%s\Autodesk\Autodesk Desktop App\removeAdAppMgr.exe" --mode unattended' % programfiles32)
def session_setup():
# Disable telemetry
if registry_readstring(HKEY_CURRENT_USER,r'SOFTWARE\\Autodesk\\AutoCAD\\R24.2\\ACAD-6101:40C\\InfoCenter','InfoCenterOn'):
registry_set(HKEY_CURRENT_USER,r'SOFTWARE\\Autodesk\\AutoCAD\\R24.2\\ACAD-6101:40C\\InfoCenter','InfoCenterOn',0,type=REG_DWORD)
def audit():
run_session_setup(control.package)
return "OK"
def run_session_setup(package_name):
for session_id in get_active_sessions():
start_interactive_process("wapt-get", "--hide session-setup %s -f" % package_name, session_id=session_id) # , minimize=True
def uninstall():
# Uninstalling the software
run(r'"%s\Autodesk\AdODIS\V1\Installer.exe" -i uninstall -q --trigger_point system -m C:\ProgramData\Autodesk\ODIS\metadata\{423E5E4A-E412-31C8-94B8-7A1171D35541}\bundleManifest.xml -x C:\ProgramData\Autodesk\ODIS\metadata\{423E5E4A-E412-31C8-94B8-7A1171D35541}\SetupRes\manifest.xsd --extension_manifest C:\ProgramData\Autodesk\ODIS\metadata\{423E5E4A-E412-31C8-94B8-7A1171D35541}\setup_ext.xml --extension_manifest_xsd C:\ProgramData\Autodesk\ODIS\metadata\{423E5E4A-E412-31C8-94B8-7A1171D35541}\SetupRes\manifest_ext.xsd -o C:\ProgramData\Autodesk\ODIS\metadata\{423E5E4A-E412-31C8-94B8-7A1171D35541}\deploymentCollection.xml' % programfiles64,timeout=600,accept_returncodes=[0, 3010, 1603])
print('Uninstalling AutoCAD Open in Desktop')
run(r'"MsiExec.exe" /X{2B8E195A-0082-4B8F-9284-0FCCB6017C23} /quiet')
print('Uninstalling Enregistrement Autodesk sur le Web et au format mobile')
run(r'"MsiExec.exe" /X{5AB49421-ADA1-4512-9E47-0AE9906F6A28} /quiet')
print('Uninstalling Autodesk Single Sign On Component')
run(r'"MsiExec.exe" /X{88003D19-C1C3-402D-A162-42D9B924266C} /passive')
print('Uninstalling Autodesk Genuine Service')
run(r'"MsiExec.exe" /X{F8C64551-A826-4185-9699-FAC37661A7EB} /passive')
print('Uninstalling Autodesk AutoCAD Performance Feedback Tool 1.3.12')
run(r'"MsiExec.exe" /X{293C8AB2-59FA-4C6E-A707-EE7457D8F567} /passive')
print('Uninstalling Autodesk Material Library Base Resolution Image Library 2023')
run(r'"MsiExec.exe" /X{3B564A94-BA47-4E42-ACD6-B5C35291210B} /passive')
print('Uninstalling Autodesk App Manager')
run(r'"MsiExec.exe" /X{4EF1F1D4-E74F-45A8-AF89-95907847D484} /quiet')
print('Uninstalling Autodesk Material Library 2023')
run(r'"MsiExec.exe" /X{8E133591-B0FD-4DB0-B60E-FB593CAF72B0} /passive')
print('Uninstalling Autodesk Applications recommandées Autodesk')
run(r'"MsiExec.exe" /X{DE8DA5A8-C311-4F2B-B1C3-27A8BC154154} /quiet')
print('Uninstalling Microsoft .NET Core Runtime - 3.1.10 (x64)')
run(r'"C:\ProgramData\Package Cache\{4714dd0a-ebab-4f59-a708-f8d7a793b3f5}\dotnet-runtime-3.1.10-win-x64.exe" /uninstall /q')
print('Uninstalling Microsoft ASP.NET Core 3.1.10 Shared Framework (x64)')
run(r'"C:\ProgramData\Package Cache\{6efe3294-03d8-4977-9c67-9f57ab075130}\AspNetCoreSharedFrameworkBundle-x64.exe" /uninstall /q')
print('Cleaning leftover folder')
remove_tree(makepath(programdata,'Autodesk'))