Barvna shema: Temna
Trenutno dejavna stran: start » en » Documentation » Microsoft Access development tools » WKL Bootstrapper » How-to guides » How to: Start any program with the starter

How to: Start any program with the starter

Deliver a program that is no Access application - or a document that opens with its file type - so that users start it with one click, always in the current version, installed for them without administrator rights.

Requires WKL Bootstrapper 2.0 (project file format 2). Microsoft Access is not needed.

Solution overview

  • files copies the program from the source into a folder per version, [VersionDir].
  • version takes the delivered version from a fixed value (value) or from the product version of a file of the delivery (from).
  • start names what the starter starts: file, arguments, folder (the working folder) and environment (variables the started program gets).
  • bitness decides which entries marked x86 or x64 are installed. Its default access follows the bitness of Microsoft Access, and Windows when no Access is installed; for a program of its own set os, x86 or x64.

Implementation

  1. Put the delivery on the share, for example \\server\share\lager with the program in bin.
  2. Write the project file bootstrapper.json next to Wkl.Bootstrapper.exe:

    {
      "format": 2,
      "product": "Inventory",
      "display": { "name": "Inventory Management", "publisher": "Contoso" },
      "version": { "from": "bin\\Inventory.exe" },
      "source": "\\\\server\\share\\lager",
      "bitness": "os",
      "files": [ { "id": "bin", "source": "bin", "target": "[VersionDir]" } ],
      "shortcuts": [ { "folder": "[Programs]\\Contoso", "name": "Inventory", "target": "[Starter]", "arguments": "[RunConfig]" } ],
      "start": {
        "file": "[VersionDir]\\Inventory.exe",
        "arguments": "/user \"[Product]\" /data \"[AppDir]\\Data\"",
        "folder": "[VersionDir]",
        "environment": [ { "name": "INVENTORY_HOME", "value": "[Dir:bin]" } ]
      }
    }

    The shortcut starts the starter, not the program, so every start checks for a new version first.

  3. Check the file and try a start without changing anything:

    Wkl.Bootstrapper.exe /check bootstrapper.json
    Wkl.Bootstrapper.exe /whatif bootstrapper.json

    /check ends with 0 when the file breaks no rule; it does not read the delivery. /whatif ends with 0 when a start would succeed (delivery included) and lists the plan.

  4. Start it. Wkl.Bootstrapper.exe installs the version (or uses the installed one) and starts Inventory.exe in [VersionDir] with the arguments and the variable.

To open a document instead of a program, name it in start.file (for example [VersionDir]\Handbuch.pdf); the program registered for its file type opens it.

Remarks

  • A file whose extension is .exe, .com, .bat or .cmd is started directly by its path; any other file is opened through its file type. A file type may hand the file to a program that is already running; that still counts as started.
  • A program that ends at once is no failure (a launcher, a script, a program handing over to a running instance). A program that cannot be started at all ends the starter with code 60.
  • start.folder defaults to the folder of start.file.
  • start.environment sets each variable for the started program only; a name may appear once per bitness, with bitness x86 or x64 on an entry to set it for that bitness only. The installed version keeps the variables, so a start without the source sets them too.
  • start.file usually lies below [VersionDir]. It may also name a program that is installed otherwise, by its full path; the starter then installs only the other entries of the project.
  • start.runtime and start.command apply only when start.file is an Access database (.accdb, .accde, .accdr, .accda, .mdb, .mde, .adp, .ade); for any other file they are ignored, and start.arguments is used instead.
  • An empty start.file installs and starts nothing; the starter then ends with 0 when the installation is complete.
  • The trusted location of Access is written only when start.file is an Access database.
en/wiki/msaccess/bootstrapper/how-to/start-any-program-with-the-starter.txt · Zadnja sprememba: uporabnika Wolfgang van der Stille