Skip to content

Deployment

This page is for the person who installs AFDIM on the computers of a shop. AFDIM is one Inno Setup installer, AFDIM_Setup_<version>.exe, from the Download page. It installs an AutoCAD® Autoloader bundle. Nothing is registered with AutoCAD by hand: no NETLOAD and no COM registration. AutoCAD scans its ApplicationPlugins folders at every start and loads the bundle.

ScopePlugin bundleUninstallerNeeds elevation
Per user (default)%APPDATA%\Autodesk\ApplicationPlugins\AFDIM.bundle%APPDATA%\AFDIM\uninstall\unins000.exeNo
All users (/ALLUSERS)%ProgramFiles%\Autodesk\ApplicationPlugins\AFDIM.bundle%ProgramFiles%\AFDIM\uninstall\unins000.exeYes

The uninstaller is outside the bundle folder on purpose, because AutoCAD scans the bundle folder. An all-users install keeps its uninstaller under %ProgramFiles%, so that a standard user cannot replace it. Use only the uninstaller of the scope in the table. Never run an uninstaller from %ProgramData%, even if an old message points there. If the uninstaller of an all-users install is missing, run the official installer from the Download page with /ALLUSERS to repair that install, then uninstall it. The installer refuses to install over an install of the other scope. Run the per-user uninstaller without administrator rights.

The bundle holds PackageContents.xml (the Autoloader manifest), state.json (installed version, update channel, install scope) and a Contents folder with one subfolder per version. An install with /NOAUTOUPDATE adds a file named noautoupdate. The installer also adds a Start Menu shortcut, AFDIM › AFDIM Help.

AFDIM writes the following at run time. Each Windows account has its own copy, except %ProgramData%\AFDIM\license, which all accounts share.

LocationContents
%APPDATA%\AFDIMSettings and saved drafting standards
%LOCALAPPDATA%\AFDIM\logsSupport log
%LOCALAPPDATA%\AFDIM\cacheUpdate downloads
%LOCALAPPDATA%\AFDIM\licenseLicence of this Windows account
%ProgramData%\AFDIM\licenseLicence for all accounts on the computer, when Windows allows the write
HKCU\Software\AFDIMInstall ID and time record of the licence check
%TEMP%\AFDIMGeometry exports made with Export the last run’s geometry… (settings dialog, About tab)

The uninstaller always keeps the licence folders and the registry key. See Uninstall.

The installer refuses to run when AFDIM is already installed in the other scope. AutoCAD scans both ApplicationPlugins roots, so both copies would load. The AFDIM command would register twice, and the in-app updater would upgrade only one copy. The refusal message names the exact unins000.exe to run first. A silent install shows no message: it stops without installing and writes the reason to the /LOG file.

One bundle serves every seat. PackageContents.xml sends each AutoCAD release series to the matching build.

BuildRelease seriesAutoCAD yearsStatus
net472R19.0 to R23.12013 to 2020Shipped; 2014 and 2016 to 2018 experimental
net48R24.0 to R24.32021, 2022, 2023, 2024Shipped
net8.0-windowsR25.0 to R25.12025, 2026Shipped
net10.0-windowsR26.02027Shipped, experimental

An AutoCAD that you install later within a covered series loads AFDIM without a reinstall. AutoCAD Mechanical of the same years loads the same build. AutoCAD LT is not supported, because it has no .NET API. The Detected AutoCAD page of the wizard is informational. It has no checkbox for each version.

This is supported. Each version installs into its own subfolder, so a running AutoCAD does not lock any file that the installer writes. The installer shows a note and continues. It does not require anyone to close AutoCAD first. A running AutoCAD loads AFDIM the next time it starts.

Terminal window
AFDIM_Setup_<version>.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART

The installer wizard and its licence agreement are in English. The AFDIM Help page opens in Vietnamese on a Windows set up for Vietnam, and in English elsewhere.

The plugin has its own interface language. A fresh install starts in English, or in Vietnamese when Windows is set up for Vietnam (display language, regional format or country). Each user can change the language with the drop-down list of 56 languages in the header of the settings dialog. The settings dialog opens from the Settings button on the AFDIM ribbon tab. The language applies to the dialog, the notice windows and the command-line messages. Text that is not translated yet appears in English. The choice is saved in the settings of that user.

SwitchEffect
/VERYSILENTNo user interface. Use it for a scripted rollout.
/SILENTProgress window only, no wizard pages.
/SUPPRESSMSGBOXESSuppress message boxes. Use it together with /VERYSILENT.
/NORESTARTNever restart. The installer does not need a restart. Pass the switch anyway.
/LOG="C:\path\afdim.log"Write a full install log. Attach it to any support request about installation.
/ALLUSERSInstall for all users under %ProgramFiles%. Requires elevation. Records the machine scope in state.json, which turns off in-app updates.
/CURRENTUSERInstall for the current user. This is the default.
/NOAUTOUPDATETurn off in-app updates for this install by adding the noautoupdate file. Running the installer again without the switch turns the updates back on.
/EXCLUDESERIES=<series>Leave out the build that covers that release series, so that AutoCAD releases in it do not load AFDIM. Separate several series with commas.
/NOICONSDo not create the Start Menu shortcut.
/DIR="C:\path"Override the install folder. This is rarely correct, because AutoCAD scans only the standard ApplicationPlugins locations.

/EXCLUDESERIES takes a release series, not a year: 2013 = R19.0, 2014 = R19.1, 2015 = R20.0, 2016 = R20.1, 2017 = R21.0, 2018 = R22.0, 2019 = R23.0, 2020 = R23.1, 2021 = R24.0, 2022 = R24.1, 2023 = R24.2, 2024 = R24.3, 2025 = R25.0, 2026 = R25.1, 2027 = R26.0. The switch removes the whole build that covers the series. Excluding R23.0 stops AFDIM loading in every AutoCAD from 2013 to 2020. Excluding R24.1 stops it in every AutoCAD from 2021 to 2024. Excluding R25.0 or R25.1 stops it in both 2025 and 2026. The installer ignores a series that it does not know.

The security trade-off of a per-user install

Section titled “The security trade-off of a per-user install”

The default install puts the plugin DLL under %APPDATA%. The signed-in user can write to this folder, and AutoCAD loads the DLL into its own process at every start. Any program that already runs as that user can overwrite the DLL in place, for example malware or a compromised add-in. Its code then runs inside AutoCAD from then on, without a prompt and without elevation. This applies to every per-user AutoCAD plugin, because the user must be able to write to the folder for an install without administrator rights to work.

What reduces the risk:

MeasureEffect
Install with /ALLUSERSThe DLL lives under %ProgramFiles%, which a standard user cannot write to. Replacing it needs administrator rights.
Keep SECURELOAD at its default of 1AutoCAD refuses .NET assemblies from outside trusted paths. It does not stop an in-place overwrite of a trusted file, but it stops a new DLL dropped elsewhere.
Application control (WDAC or AppLocker)Can block a tampered DLL. From 0.1.6 the installer and AFDIM.dll are code-signed (publisher TO VAN TIN).
Watch the bundle folder for unexpected writesNothing should modify Contents\<version>\ except the installer or an in-app update (Update now on the About tab).

A shop that wants the DLL in a place that only administrators can change should install with /ALLUSERS.

Use /ALLUSERS for a shop with several seats. %APPDATA% roams. With roaming profiles or folder redirection, a per-user install copies the plugin over the network at every sign-in. Two computers that are signed in as the same user can also compete for the folder.

Terminal window
AFDIM_Setup_<version>.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /ALLUSERS

Run it from an elevated context, for example an SCCM, Intune or Group Policy startup script. Every user on the computer then gets AFDIM, and the plugin files are not in the roaming profile. The settings of each user in %APPDATA%\AFDIM still follow the profile.

If you must stay per user on roaming profiles, exclude %APPDATA%\Autodesk\ApplicationPlugins from folder redirection.

An all-users install, also called a machine-wide install, turns off in-app updates, because a standard user cannot write to %ProgramFiles%. When AFDIM finds a newer version, the Updates group on the About tab of the settings dialog shows the text below instead of Update now:

This installation cannot update itself: it was installed for all users, updates were turned off at install time, or its folder is read-only.

Push new versions in the same way as the first one. Running a newer installer over an existing install is a supported upgrade. It keeps the settings of each user and the licence of each computer. What changed in each version is on the Release notes page.

An update check is one HTTPS request for the signed update feed on update.afdim.com. It never blocks AutoCAD. AFDIM checks:

  • in the background when AutoCAD starts: at most once every 24 hours after a successful check, and not sooner than 2 hours after a failed one
  • once when the settings dialog is opened, if AFDIM has not checked yet in that AutoCAD session
  • when a user chooses Check now on the About tab

The first two checks happen only while Check for updates automatically is ticked on the About tab and the environment variable AFDIM_DISABLE_BACKGROUND_SERVICES=1 is not set. Setting that variable also turns off the AFDIM log file and the background licence check that fetches a waiting licence file or a renewal. Without the log file, a support zip contains no log.

Each computer needs its own licence. Activate it in the Licence group on the About tab of the settings dialog. With a licence key, a user chooses Enter licence key…. The computer must reach api.afdim.com over HTTPS at that moment. Without network access from AutoCAD, a user chooses Request licence instead. The request code that it shows is sent through the Licence page. The licence file that comes back is loaded with Load licence… in the same group. See How licensing works.

When Windows allows it, AFDIM also writes the loaded licence to %ProgramData%\AFDIM\license. Other Windows accounts on the same computer then do not need to activate again.

Terminal window
rem per-user install (default)
"%APPDATA%\AFDIM\uninstall\unins000.exe" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART
rem all-users install, from an elevated context
"%ProgramFiles%\AFDIM\uninstall\unins000.exe" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART

Inno Setup also records the silent command in the QuietUninstallString value of the registry key Software\Microsoft\Windows\CurrentVersion\Uninstall\{04AC9D3E-F942-4408-8BBC-73CB09043772}_is1. The key is under HKCU for a per-user install and under HKLM for an all-users install.

The uninstaller keeps the settings of the user by default, so an uninstall and a reinstall can work as a repair. To also delete data, add /PURGEDATA:

Terminal window
"%APPDATA%\AFDIM\uninstall\unins000.exe" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /PURGEDATA

/PURGEDATA deletes %APPDATA%\AFDIM, %LOCALAPPDATA%\AFDIM and %TEMP%\AFDIM of the account that runs the uninstaller. Other Windows accounts keep their folders. Inside %LOCALAPPDATA%\AFDIM, the license folder is always kept. /PURGEDATA never deletes %ProgramData%\AFDIM\license or the registry key HKCU\Software\AFDIM. The update cache is always removed.

If AutoCAD is running during the uninstall, the uninstaller keeps the files that AutoCAD holds. An interactive uninstall shows a window that says so: close every CAD window, then run the uninstaller again. A silent uninstall lists those files in its log. Files in a folder whose path changed are also kept. Close every CAD window and retry the uninstall or the reinstall, or check the paths in the log before you delete anything by hand. No restart is requested, and nothing is deleted at the next sign-in.

  1. Start AutoCAD. The AFDIM ribbon tab appears with two buttons, Dimension and Settings. These two names are English in every language.
  2. Run AFDIM. It works without any NETLOAD. On a computer without a licence it opens the Welcome to AFDIM window or the AFDIM is not activated window. Either window shows that the plugin is loaded.
  3. Check that PackageContents.xml exists in the bundle folder and has a Components block whose SeriesMin and SeriesMax cover the installed AutoCAD.
  4. Check that state.json shows the expected activeVersion, channel and installScope.

If AFDIM is an unknown command, restart AutoCAD once, because AutoCAD scans for plugins only at start. If it still fails, check the SECURELOAD and TRUSTEDPATHS policy. Then send the /LOG file and the AutoCAD version to Support.