如何获得MSIX安装程序以将CLI应用程序二进制文件添加到PATH? [英] How can I get my MSIX installer to add my CLI application binary to the PATH?

查看:78
本文介绍了如何获得MSIX安装程序以将CLI应用程序二进制文件添加到PATH?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目标:将我的CLI应用程序的EXE安装程序转换为MSIX安装程序.

Goal: convert the EXE installer for my CLI application to an MSIX installer.

方法::使用MSIX打包工具将EXE安装程序转换为MSIX

Method: using the MSIX Packaging Tool to convert the EXE installer to MSIX

预期:MSIX打包工具将检测到PATH的更新,以便二进制文件在CMD/PS中可用.

Expected: the MSIX Packaging Tool will detect updates to PATH so that the binary is available in CMD/PS

实际:PATH变量未使用二进制路径进行更新,因此安装成功"将被安装.但是二进制文件在CMD/PS中不可用

Actual: the PATH variable is not updated with the binary path, so the install "succeeds" but the binary isn't available in CMD/PS

我正在尝试使用MSIX打包工具打包CLI的安装程序,但是在安装时无法获取它来更新PATH变量.去年,我用NSIS创建了一个EXE安装程序,它可以执行我需要做的所有事情,但是如果可能的话,我希望将安装程序更新为MSIX,因为这似乎是未来.但是,似乎MSIX完全专注于桌面样式的应用程序,不需要在PATH中提供其应用程序二进制文件.

I'm trying to use the MSIX Packaging Tool to package an installer for a CLI, but I can't get it to update the PATH variable upon install. I created an EXE installer last year with NSIS that does everything I need it to do, but I'm looking to update the installer to MSIX if possible since that seems to be the future. However, it seems like MSIX is completely focused on desktop-style applications, which don't need to make their application binaries available in PATH.

我正在使用MSIX打包工具,因为它承诺将EXE安装程序转换为MSIX.似乎可以捕获到我对注册表所做的所有更改,并将文件正确添加到安装目录中,但是它显然无法捕获PATH更新.

I'm using the MSIX Packaging Tool since it promises to convert EXE installers to MSIX. It seems to catch all the changes I'm making to the registry and add the files to the install directory properly, but it doesn't catch PATH updates apparently.

是否有人了解MSIX以及CLI应用程序可能遇到的问题?

Does anyone have insight into MSIX and the possible issues I might run into for a CLI application?

推荐答案

正如Peter所提到的,从MSIX软件包中执行此操作的正确方法是使用执行别名.以下文章包含有关执行别名如何工作以及如何在程序包中定义它的更多详细信息,无论您使用哪种工具来构建MSIX程序包.

As Peter mentioned, the correct way to do this from an MSIX package is with the use of an execution alias. The following article contains more details about how an execution alias works and how you can define it in your package, no matter the tool you use to build the MSIX package.

-执行别名

这篇关于如何获得MSIX安装程序以将CLI应用程序二进制文件添加到PATH?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆