且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将产品名称附加到安装

更新时间:2023-11-30 12:24:46

我不确定要执行此操作的顺序,但是如果您想向用户显示包含产品名称的默认目录,那么您可以附加[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).