简体   繁体   English

如何从巧克力垫片中获取二进制路径?

[英]How to get the binary path from a chocolatey shim?

I need to extract the product version from a binary in .NET.我需要从 .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?有没有办法以编程方式从 shim 读取二进制文件的路径?

I found it myself - calling the shim with the parameter --shimgen-help will also ouptut the target path.我自己找到了 - 使用参数--shimgen-help调用 shim 也会输出目标路径。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM