For version 9.1 ghidraRun.bat gets unpacked to ...\chocolatey\lib\ghidra\ghidra_9.1_PUBLIC\ but the choco package looks for it in a different location: ...\chocolatey\lib\ghidra\ghidra_9.1.0\.
This is the complete output on my machine (Win10, 1909, x64).
>choco install -f ghidra
Chocolatey v0.10.15
Installing the following packages:
ghidra
By installing you accept licenses for the packages.
ghidra v9.1.0 already installed. Forcing reinstall of version '9.1.0'.
Please use upgrade if you meant to upgrade to a new version.
Progress: Downloading ghidra 9.1.0... 100%
ghidra v9.1.0 (forced) [Approved]
ghidra package files install completed. Performing other installation steps.
Downloading ghidra
from 'https://ghidra-sre.org/ghidra_9.1_PUBLIC_20191023.zip'
Progress: 100% - Completed download of D:\temp\chocolatey\ghidra\9.1.0\ghidra_9.1_PUBLIC_20191023.zip (288.12 MB).
Download of ghidra_9.1_PUBLIC_20191023.zip (288.12 MB) completed.
Hashes match.
Extracting D:\temp\chocolatey\ghidra\9.1.0\ghidra_9.1_PUBLIC_20191023.zip to C:\ProgramData\chocolatey\lib\ghidra...
C:\ProgramData\chocolatey\lib\ghidra
WARNING: 'C:\ProgramData\chocolatey\lib\ghidra\ghidra_9.1.0\ghidraRun.bat' does not exist. If it is not created the shortcut will not be valid.
WARNING: 'C:\ProgramData\chocolatey\lib\ghidra\ghidra_9.1.0\support\ghidra.ico' does not exist. A default icon will be used.
Cannot find path 'C:\ProgramData\chocolatey\lib\ghidra\ghidra_9.1.0' because it does not exist.
Only an exit code of non-zero will fail the package by default. Set
`--failonstderr` if you want error messages to also fail a script. See
`choco -h` for details.
ShimGen has successfully created a shim for WallaceSrc.exe
ShimGen has successfully created a shim for WallaceVersion2.exe
ShimGen has successfully created a shim for WinHelloCPP.exe
ShimGen has successfully created a shim for decompile.exe
ShimGen has successfully created a shim for sleigh.exe
ShimGen has successfully created a shim for pdb.exe
ShimGen has successfully created a shim for wininst-6.0.exe
ShimGen has successfully created a shim for wininst-7.1.exe
ShimGen has successfully created a shim for wininst-8.0.exe
ShimGen has successfully created a shim for wininst-9.0-amd64.exe
ShimGen has successfully created a shim for wininst-9.0.exe
ShimGen has successfully created a shim for demangler_gnu.exe
The install of ghidra was successful.
Software installed to 'C:\ProgramData\chocolatey\lib\ghidra'
For version 9.1
ghidraRun.bat
gets unpacked to...\chocolatey\lib\ghidra\ghidra_9.1_PUBLIC\
but the choco package looks for it in a different location:...\chocolatey\lib\ghidra\ghidra_9.1.0\
.This is the complete output on my machine (Win10, 1909, x64).