Color scheme: Dark
You are here: start » en » Documentation » Microsoft Access development tools » WKL Office JSON » WKL Office JSON how-to guides » How to: Install and deploy WKL Office JSON

How to: Install and deploy WKL Office JSON

Make JDoc and the other JSON classes available to VBA on a development PC and on the PCs of the users of an application - without the source code and without .NET.

Solution overview

  • One file per bitness. Wkl.Office.JSON.dll is a native COM server that carries its own runtime: no .NET installation is needed on any PC.
  • Bitness of Office. 32-bit Office needs the x86 file, 64-bit Office the x64 file; what counts is Office, not Windows (File › Account › About Access).
  • Registration per Windows user with the regsvr32 of the same bitness and /n /i:user, no administrator rights.
  • Reference WKL Office JSON 1.2 in the VBA project, or late binding with CreateObject("WklJSON.JDoc").

Implementation

  1. Copy Wkl.Office.JSON.dll of the release folder x86 (32-bit Office) or x64 (64-bit Office) to a local folder that stays, for example %LOCALAPPDATA%\WKL\Office JSON\2.0\x86. The .pdb and .xml files beside it are debug symbols and documentation; they are not needed.
  2. Close Access and register for the current Windows user. For 32-bit Office:

    %windir%\SysWOW64\regsvr32.exe /n /i:user "%LOCALAPPDATA%\WKL\Office JSON\2.0\x86\Wkl.Office.JSON.dll"

    For 64-bit Office use %windir%\System32\regsvr32.exe and the x64 file. Add /s in scripts to suppress the message box; to remove the registration, add /u.

  3. In the VBA editor choose Tools › References and tick WKL Office JSON 1.2. Check in the Immediate window:

    ? CreateObject("WklJSON.JDoc").LoadJson("{""a"": 1}")

    It prints True.

On the PCs of the users repeat steps 1 and 2 for every Windows user who starts the application, for example from a logon script; the database keeps its reference. Build an ACCDE on a PC where the same file is registered.

With the starter of WKL Bootstrapper

From release 1.0.2 the package carries registration.json beside Wkl.Office.JSON.dll in x86 and x64: the per-user registration as data. The starter of WKL Bootstrapper registers WKL Office JSON from it for each Windows user, without administrator rights and without regsvr32, keeps it under the release (2.0.0) in the user's profile and removes it when no installed application needs it any more. A package from 2.0.0 on needs the starter 2.3.1 or later; together with WKL Forms Object Library 2.0 it needs the starter 3.1 or later. From WKL Bootstrapper 3.0 on, the starter program is Wkl.Bootstrapper.exe; before, it was Wkl.Access.Bootstrapper.exe.

  1. Create the project of the starter with the template json (with access and components for an Access application with WKL controls): /new-project ... /template access,components,json.
  2. Copy the folders x86 and x64 of the release package, each with its registration.json, into the folder json of the delivery folder, as the template says.
  3. Deliver as described for the starter (code wiki WKL-Access-Bootstrapper, pages “How to: Create a project from templates” and “The installer of the bootstrapper 2.0”).

The packages 1.0 and 1.0.1 have no registration.json; their Wkl.Access.JSON.dll reports the version 0.1.0. Take 1.0.2 or later for a delivery through the starter.

Up to release 1.0.3 the library was called WKL Access JSON, its file Wkl.Access.JSON.dll and its type library WKL Access JSON 1.0. A reference to it resolves to WKL Office JSON 1.2 without compiling again: the library identifier, the ProgIDs and every member are the same. An application delivered with 1.0.x keeps its file; where both releases are installed, the starter registers the newer one.

Remarks

  • Checking the package. Every program file of the package (EXE and DLL) carries the Authenticode signature of EMSR DATA, D.O.O. with a time stamp, and SHA256SUMS lists the SHA-256 checksum of every file. sbom.cdx.json is the software bill of materials (CycloneDX 1.6): every file of the package and the parts of other manufacturers that NativeAOT links into the DLL (the .NET runtime, the Visual C++ runtime library), each with version and licence. Before you register, check the signature and the checksums in the package folder:

    Get-AuthenticodeSignature x86\Wkl.Office.JSON.dll | Format-List Status, SignerCertificate
    Get-Content SHA256SUMS | ForEach-Object { $hash, $file = $_ -split '  ', 2; if ((Get-FileHash -LiteralPath $file).Hash -ne $hash) { "changed: $file" } }

    Status must be Valid and the signer EMSR DATA, D.O.O.; the second command prints nothing when every file is unchanged.

  • No installer of its own. The package holds no MSI or setup program: install by hand as above, or deliver it with your application through the starter of WKL Bootstrapper, which registers it for each user.
  • The folder must stay. The registration points to the file at its place; after moving it, register again.
  • Every Windows user registers once. /n /i:user writes only to HKEY_CURRENT_USER; so does the starter.
  • One file, no Wkl.Office.Json.Core.dll. NativeAOT links the core into Wkl.Office.JSON.dll; the package carries only the core's .pdb and .xml.
  • Wrong bitness shows as run-time error 429 or a reference marked MISSING; register the file of the Office bitness.
en/wiki/msaccess/json/how-to/install-and-deploy.txt · Last modified: by Wolfgang van der Stille