将产品名称附加到安装 [英] Append ProductName into INSTALLLOCATION

查看:38
本文介绍了将产品名称附加到安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在 _BrowseProperty 的末尾附加 ProductName.就像一个:

I want to append ProductName in the end of _BrowseProperty. Like a:

<Publish Event="SetTargetPath" Value="[_BrowseProperty][ProductName]">1</Publish>

但这是错误的方法,所以这是不可能的.我找到了这个建议,有点脏,真的.我想替换 ProductName,因为这在 notepad++ 安装程序中发生了(我更改了C:\",按确定"和 INSTALLLOCATION:=C:\[ProducName]).我还想更改 BrowseDlg 和目录树(因为默认的 DirectoryList/DirectoryCombo 看起来很糟糕)),但是除了 WIX [参考].

But this is the wrong approach, and so it is impossible. I found this advice, bit it is dirty, really. I want to substitute ProductName as this happened in notepad++ installer (I change "C:\", press "ok" and INSTALLLOCATION:=C:\[ProducName]). Also I wanted to change BrowseDlg and directory tree (cause the default DirectoryList/DirectoryCombo is so poor-looking)), but there is no other not-hurt variant besides the standard in WIX [ref].

最近有什么变化吗?

推荐答案

我不确定要执行此操作的顺序,但是如果您想向用户显示包含产品名称的默认目录,那么您可以附加[ProductName] 到安装文件夹.通常有一个类型 51 的自定义操作来设置默认位置 - 您可能已经有一个将默认安装文件夹设置为类似的内容:

I'm not sure of the order in which want to do this, but if you want to show the user the default directory containing the product name then you append [ProductName] to the install folder. Typically there is a type 51 custom action to set the default location - you may already have one that sets the default install folder to something like:

[ProgramFilesFolder][制造商][ProductName]

[ProgramFilesFolder][Manufacturer][ProductName]

并且用户可以根据需要进行更改.默认安装文件夹可能是 INSTALLDIR.虽然我不建议更改用户指定的内容,但您可以在用户选择文件夹后使用类型 51 自定义操作来执行此操作,因此您基本上可以在 INSTALLDIR 设置后将 INSTALLDIR 更改为 INSTALLDIR[ProductName]浏览对话框.

and the user can change that if they want. The default install folder might be INSTALLDIR. Although I wouldn't recommend changing what the user specifies, you'd do that with a type 51 custom action after the user has chosen the folder, so you'd basically change INSTALLDIR to be INSTALLDIR[ProductName] after INSTALLDIR has been set by the browse dialog.

所以这一切都取决于您已经为设置默认安装位置所做的工作,如果有的话,还取决于您是否要更改用户指定的内容,以及在没有浏览时您可能希望如何处理静默安装对话框(这就是为什么通常有一个类型 51 CA 来设置默认值).

So this all depends on what you have already done to set a default install location, if anything, also whether you want to change what the user specifies, and how you may want to deal with a silent install when there is no browse dialog (which is why there is typically a type 51 CA to set a default).

这篇关于将产品名称附加到安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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