How to get the binary path from a chocolatey shim?

142 Views Asked by At

I need to extract the product version from a binary in .NET. This works with the actual binary. However, when a chocolatey shim is referenced, then I only get the product version of the shim. Is there a way to programmatically read the path to the binary from the shim?

1

There are 1 best solutions below

0
PSt On

I found it myself - calling the shim with the parameter --shimgen-help will also ouptut the target path.