How to: Install the released package
Install a release of the WKL Forms Object Library on a development PC so that the controls appear in Access's ActiveX Controls dialog and VBA knows them - without the source code and without building anything.
Requires Windows 10 or 11 and Microsoft 365 Access or the Access Runtime.
Solution overview
- Runtime: install the .NET 10 Desktop Runtime in the bitness of Office.
- Files: copy the folder of the Office bitness (
x86for 32-bit Office,x64for 64-bit Office) of the release to a local folder that stays where it is. - Registration: register
Wkl.Forms.ObjectLibrary.dllfrom that folder with theregsvr32of the same bitness, for the current Windows user (/n /i:user, no administrator rights). - Check: the reference WKL Forms x.y Object Library of the release appears in the VBA editor.
Supported configuration: 32-bit and 64-bit Access (Microsoft 365 Access and the Access Runtime); the package contains the files for both.
Implementation
- Find the bitness of Office. WKL follows Microsoft Access, not Windows: use the
x64files with 64-bit Access and thex86files with 32-bit Access. In Access: File › Account › About Access shows „32-bit“ or „64-bit“. The bitness of Windows does not matter: 32-bit Office on 64-bit Windows needs the 32-bit (x86) files. Microsoft installs Office as 64-bit by default; 32-bit Office remains common where older VBA solutions, ActiveX controls or add-ins are in use, which is why both bitnesses are built. A mismatch shows as missing controls or a MISSING reference (troubleshooting). - Install the .NET 10 Desktop Runtime of that bitness from https://dotnet.microsoft.com/download/dotnet/10.0 (column „Desktop Runtime“, x86 for 32-bit Office, x64 for 64-bit Office). A runtime of the other bitness does not help.
Copy the files. A release contains the folders
x86andx64with the controls,tools\build(the build tool, see How to: Build an Access application from its text sources),control-blocks(the control blocks of every WKL control, see How to: Put WKL controls into forms by code),CHANGELOG.md, andaddinwithtools\install-addin.ps1, the add-in WKL Extensions with the designers under Database Tools › Add-Ins (runtools\install-addin.ps1once per Windows user, with Access closed). Copy the whole release package to a local folder that stays where it is, for example%LOCALAPPDATA%\WKL\Access Components\<version>, so thattools,control-blocksandthemesstay together with the controls and project files can name them from one place. The files of the bitness folder belong together; the registration points to%LOCALAPPDATA%\WKL\Access Components\<version>\x86:File Purpose Wkl.Forms.ObjectLibrary.dllThe file you register: the native start module with the type library Wkl.Forms.ObjectLibrary.Managed.dll,.deps.json,.runtimeconfig.jsonThe controls on .NET 10, loaded by the start module from the same folder Wkl.Forms.ObjectLibrary.Core.dllLogic of the controls without COM Wkl.Office.Json.Core.dllThe JSON engine behind JPath and AsJSON*.pdb,*.xmlDebug symbols and documentation files; not needed to run, may be left out Close every Access instance (Access keeps a loaded DLL until it exits), then register for the current Windows user. For 32-bit Office:
%windir%\SysWOW64\regsvr32.exe /n /i:user "%LOCALAPPDATA%\WKL\Access Components\<version>\x86\Wkl.Forms.ObjectLibrary.dll"
For 64-bit Office:
%windir%\System32\regsvr32.exe /n /i:user "%LOCALAPPDATA%\WKL\Access Components\<version>\x64\Wkl.Forms.ObjectLibrary.dll"
regsvr32reports success in a message box; add/sto suppress it in scripts (the exit code is then0on success). Registering a release removes the registration of every other version of the library for this user, so a database never picks an older copy.- Check. Open a database, open the VBA editor (Alt+F11), choose Tools › References and find WKL Forms <version> Object Library (the version of the release). A form in design view now offers the controls under Form Design › Controls › ActiveX Controls („WKL Grid“, „WKL TreeView“ …). Access sets the reference WKL Forms x.y Object Library itself when a control is inserted; it provides IntelliSense and the constants (
wke…,wso…,wdz…and so on).WklToastandWklLinkManagerare objects, not controls: set the reference in the VBA editor (Tools › References › WKL Forms x.y Object Library) and create them withNew.
To remove the registration, close Access and run the same command with /u:
%windir%\SysWOW64\regsvr32.exe /u /n /i:user "%LOCALAPPDATA%\WKL\Access Components\<version>\x86\Wkl.Forms.ObjectLibrary.dll"
To install a newer release, close Access, copy it into a folder of its own and register it as in step 4; then delete the old folder.
Remarks
- Per Windows user.
/n /i:userwrites only toHKEY_CURRENT_USER. Every Windows user of the PC who opens the database registers once for themselves. A registration for all users of a PC (regsvr32without/n /i:user, as administrator) is not supported in this release. - The folder must stay. Moving or deleting the folder breaks the registration: the controls are missing from the dialog and the reference is marked MISSING. Register again from the new place.
- What the registration looks like. The class (
WklForms.*ProgIDs and their class ids) is the same in every release, so a database built with an older release finds the newer one. The type library has the version of the release, x.y; Windows writes it in hexadecimal as the key name belowHKEY_CURRENT_USER\Software\Classes\TypeLib\{A37D549E-FCD0-48EC-8B14-C7323B747E4F}, so release 1.56 is the key1.38(0x38 = 56), with the name „WKL Access Components 1.56“ as its value and0\win32and0\win64naming the DLL of each bitness. The VBA editor shows the decimal name. A database binds to the type library by its id and resolves the version that is registered when it opens (see Versions). - No setup program of its own. Install with the steps above or a script with them (How to: Deploy an application with WKL controls to user PCs), or deliver the components together with the application through WKL Bootstrapper, which registers them for each user.
- Another .NET version in Access. A native start module loads the .NET 10 runtime into
MSACCESS.EXE. A process can run only one .NET (CoreCLR) version: when another add-in loaded a different one into Access first, the controls cannot start, and the start module reports this in a message instead of disturbing Access; see Access reports that another .NET version is loaded.
Related topics
- What the per-user registration writes - to check a PC after registering or unregistering
CHANGELOG.mdin the release package - what each release contains