Deploy Probistica
Probistica installs per user. Run the install in the context of each user, not as the system account and not as an administrator account. The install writes to %APPDATA%, %LOCALAPPDATA%, %TEMP%, and HKCU of the account that runs it. In a software deployment tool, select the user context.
The release package installs the add-in with:
Probistica-setup.exe, the setup program of the release package. It also adds an entry to Settings > Apps, copies itself for the uninstall, and copies the pages of the folderdocsto%LOCALAPPDATA%\for the Help button.Programs\ Probistica\ docs
The release package also holds Probistica.Xdk.dll and Probistica.Xdk.xml, the .NET client for developers. The setup does not install them. Give them only to developers who write .NET code that controls Probistica inside Excel.
Commands of the setup program
The setup takes Probistica64.xll from its own folder, unless /xll gives another file. Without /quiet, it opens its window.
| Task | Command |
|---|---|
| Install, silent | Probistica-setup.exe /install /quiet /log "%TEMP%\ |
| Install another XLL file | Probistica-setup.exe /install /quiet /xll "<path>\ |
| Report only (changes nothing) | Probistica-setup.exe /report /quiet /log "<file>" |
| Uninstall, silent | "%LOCALAPPDATA%\ |
The silent uninstall command is also the value QuietUninstallString of the entry HKCU\. The setup appends its lines to the log file and also writes them to the standard output. /report is the default mode.
Probistica-setup.exe is a Windows program, not a console program. A software deployment tool waits for it and reads its exit code. An interactive cmd prompt and PowerShell do not wait for it, and a console window does not show its lines. The standard output gets the lines only when the caller redirects it. Thus always give /log.
A refused command line ends with exit code 2. The setup shows the reason in a message box only when it runs in a session with a desktop (not session 0), without /quiet, without a /log file that it can write, and without a standard output. A silent switch of other installers (/s, /silent, /verysilent, /q, /qn, /qb, /passive) is an unknown option, so the setup refuses it, but it shows no message box.
To wait for the setup by hand and read its exit code:
- At a cmd prompt:
start "" /wait Probistica-setup.exe /install /quiet /log "<file>", thenecho %ERRORLEVEL%. - In PowerShell:
$p = Start-Process -FilePath .\, thenProbistica-setup.exe -ArgumentList '/install /quiet /log "<file>"' -Wait -PassThru $p.ExitCode.
Exit codes
| Code | Meaning |
|---|---|
| 0 | Done, or nothing to do: the add-in is registered already, nothing was installed before an uninstall, or the report ended. |
| 1 | Failure. Nothing was changed when the message ends with "Nothing was changed." |
| 2 | Refusal. Nothing was changed. |
The causes of exit code 1:
- The XLL file does not exist.
- The folder
%APPDATA%\does not exist.Microsoft\ AddIns - The name of the Options copy in
%TEMP%exists already. - The export of the Options key with
reg.exefailed. - The setup only: the XLL is the installed copy itself; the key
HKCU\does not exist;Software\ Microsoft\ Office\ 16.0\ Excel\ Options APPDATA,LOCALAPPDATA, orTEMPis not a full path; the setup cannot read the current state; a step failed after the first change; the helper that deletes the installed setup did not start.
The causes of exit code 2:
- An Excel process runs. The check counts every
EXCELprocess on the computer, also in the sessions of other users. /installwhen Office is 32-bit: the valuePlatformofHKLM\(64-bit registry view) isSOFTWARE\ Microsoft\ Office\ ClickToRun\ Configuration x86. The message is "This Excel is 32-bit (the Click-to-Run value Platform is x86). Probistica needs 64-bit Excel. Nothing was changed." The uninstall still works./installwhen anotherProbistica64.xllis registered, that is, an OPEN value names a fileProbistica64.xllin another folder./installwhen an OPEN value names a fileatRISK64.xllin any folder. atRISK is the old working name of the add-in. Remove the old atRISK add-in first. When anotherProbistica64.xllis also registered, the same message names both./installwhen the file%APPDATA%\exists, also without an OPEN value. The setup also refuses when the entryMicrosoft\ AddIns\ atRISK64.xll HKCU\has theSoftware\ Microsoft\ Windows\ CurrentVersion\ Uninstall\ {6F85C95A-7B98-4DCA-BD2B-19159EB7CBBD} DisplayNameatRISK: the old atRISK setup used the same key. The uninstall of Probistica keeps that entry./installand/uninstalltogether.- The setup only: an unknown option, an option twice, an option without its value,
/reportwith/installor/uninstall, or a log file that cannot be written.
Preconditions
- Excel is closed. Close Excel in all sessions of the computer. On a terminal server, deploy when no user has Excel open.
- 64-bit Excel. Probistica has no add-in for 32-bit Excel. For a Click-to-Run install of Office, the setup program reads the value
Platform(see the causes of exit code 2) and refusesx86. An MSI install of Office has no such value. The setup program then does not check the bitness, so make sure that the Office of the computer is 64-bit. - The add-ins folder exists.
%APPDATA%\must exist. A new profile can be without it. Create it before the install, for example withMicrosoft\ AddIns cmd /c mkdir "%APPDATA%\in the user context.Microsoft\ AddIns" - The Excel options key exists (setup). The setup needs
HKCU\. Excel makes the key at its first start. Without the key, the setup refuses with exit code 1.Software\ Microsoft\ Office\ 16.0\ Excel\ Options - The download mark. The setup writes new files, so the installed copies have no Mark of the Web.
- The signatures of the package. A release package can be signed or unsigned. Its file
manifest.txttells you, for each program file (Probistica64.xll,Probistica-setup.exe,Probistica.Xdk.dll). An unsigned file has the linesignature: unsigned. A signed file has a linesignature: <status>, <subject of the certificate>, thumbprint <thumbprint>and a linetimestamp: .... Read these lines before you make a rule.Get-AuthenticodeSignature -FilePath <file>in PowerShell shows the same data for an installed file. - Program rules (setup). Rules of AppLocker or of App Control for Business can block a program in a user folder. The setup runs from the release folder, from
%LOCALAPPDATA%\, and, for the uninstall, from a folderPrograms\ Probistica %TEMP%\. For a signed setup, a publisher rule for the certificate thatProbistica-setup-<32 hexadecimal digits> manifest.txtnames lets it run from each of these folders. For an unsigned setup, use a file hash rule, or a path rule for each of these folders. - Excel add-in policy. With the Trust Center setting "Require Application Add-ins to be signed by Trusted Publisher", Excel loads only a signed XLL whose certificate is in the store Trusted Publishers of the user. For a signed XLL, deploy the certificate that
manifest.txtnames to that store, for example with a Group Policy. Excel does not load an unsigned XLL with this setting.
Detection rule
Use the installed file and its file version:
- File:
%APPDATA%\Microsoft\ AddIns\ Probistica64.xll - Property: FileVersion, for example
0.3.0.0(the product version plus.0). The ProductVersion is the version without.0, for example0.3.0.
For an install with the setup, the entry HKCU\ with the value DisplayVersion is a second rule.
Update
Close Excel, and run the install of the new release. The setup program replaces %APPDATA%\ and keeps the OPEN value. The setup also updates its entry and its installed copy. License files and the settings in %APPDATA%\Probistica stay.
Roll back
- To remove the version: run the uninstall.
- To restore the add-in list of Excel exactly: each install and uninstall exports the Options key first, to
%TEMP%\. The file holds all values of the key. An import does not delete values that came later. Close Excel, delete the valuesProbistica-install-options-<yyyyMMdd-HHmmss-fff>.reg OPEN,OPEN1,OPEN2, ... ofHKCU\, and then runSoftware\ Microsoft\ Office\ 16.0\ Excel\ Options reg import "<file>". - To go back to an older version: run the install of the older release. The setup program does not compare versions.
Remove Probistica completely
Per user (in the context of each user, with Excel closed):
- Run the uninstall. It removes the OPEN values of Probistica, the Add-in Manager value, the AddInLoadTimes values of the installed path and of its ribbon name
Dna_<GUID>_<n>, the XLL copy, and (setup) the entry and the installed setup program. - If you want to remove the license data too, delete
%LOCALAPPDATA%\(theProbistica\ Licenses .licfiles andstate.json). - Optional: delete
%LOCALAPPDATA%\(unsent error or support reports, including any text or reply e-mail typed after a failed Send).Probistica\ ErrorReports - Optional: delete
%APPDATA%\Probistica. It holdsdefine-distribution.xml, the settings of the Define Distribution window, and the damaged copies of that file. - Optional: delete the copies
%TEMP%\, the setup foldersProbistica-install-options-*.reg %TEMP%\of an earlier uninstall, andProbistica-setup-* %LOCALAPPDATA%\if a file remains there.Programs\ Probistica - Optional: delete
HKCU\if you set it.SOFTWARE\ Policies\ Probistica
Per computer (as an administrator):
- Delete
%PROGRAMDATA%\if you put license files there.Probistica\ Licenses - Delete
HKLM\if you set it.SOFTWARE\ Policies\ Probistica - Remove the license files from the share of
LicensePath, if you use one.
The footprint of Probistica lists each item. The uninstall keeps the AddInLoadTimes values that Excel wrote for another path of the XLL, for example after a manual load from a download folder. They do no harm.