[SOLVED] Autodesk AutoCAD 2023.1.2 Package

Questions about WAPT Packaging / Requests and help regarding Wapt packages.
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Locked
olaplanche
Messages: 178
Registration: January 26, 2017 - 11:11

December 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:

Code: Select all

depends           : wapt-vcredist2012
audit_schedule    : 5
setup.py file:

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'))
Last edited by olaplanche on June 16, 2023 - 09:31, edited 1 time.
- Installed WAPT version: 2.6.0.16795 Enterprise
- Server OS: Linux / Debian Bookworm
- Administration/package creation machine OS: Windows 10
User avatar
dcardon
WAPT Expert
Messages: 1932
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

December 7, 2022 - 12:28

Thank you, Olivier!

Denis
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
Locked