您可以使用 CustomAction 的 Directory 属性来指定工作目录。
它不能与 FileKey 一起使用,但可以与 ExeCommand 一起使用。您可以将 ExeCommand 设置为类似“[TARGETDIR]file.exe”的值,而不是 FileKey。
这是一个示例,从产品安装的文件夹中运行“tinytask.exe”
<?xml version="1.0" encoding="UTF-8"?>
未安装