Visual Studio 2008安装项目,修复了已安装工具包的位置 [英] Visual Studio 2008 setup project, fixing the location of installed kit

查看:120
本文介绍了Visual Studio 2008安装项目,修复了已安装工具包的位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Visual Studio 2008中创建了一个安装项目.我想要安装位置 用户在安装过程中可能永远不会修改DefaultLocation 在安装过程中跳过选择安装文件夹"对话框.有办法吗 这可以在VS2008(或VS2010)中使用,也可以使用MSI编辑器(例如Orca)进行.请指教 尽您所能,谢谢.

I've created a setup project in Visual Studio 2008. I would like the installed location DefaultLocation never to be modified by the user during installation, probably by skipping the 'Select Installation Folder' dialog during setup. Is there a way to do this, either in VS2008 (or VS2010) or using an MSI editor such as Orca. Please advise at your earliest convenience, thanks.

推荐答案

是的,您可以在Orca中手动进行操作,也可以编写使用

Yes, you can do it in Orca, manually, or you can write a post-processing script that uses the WindowsInstaller.Installer COM object to doctor-up the MSI.

我从Visual Studio生成的MSI在安装时显示了此信息:

The MSI I have generated from Visual Studio present this on install:

  1. 欢迎
  2. EULA
  3. 文件夹形式
  4. 确认安装
  5. ...
  1. Welcome
  2. EULA
  3. Folder Form
  4. Confirm Install
  5. ...

在文件夹"窗体上,有一个Browse...按钮,允许用户选择要安装到的文件夹.听起来您只是想禁用该特定操作,而无需更改安装流程.

On the Folder form, there's a Browse... button that allows the user to select the folder to install into. Sounds like you just want to disable THAT particular action, without changing the flow of the install otherwise.

如果这是原始的:

If this is the original:

...您只想丢失浏览"按钮.但是为了避免混淆,您还需要更改该对话框上的文本. 确认安装文件夹,而不是选择安装文件夹.并且您需要修改告诉人们单击浏览的文本.然后可能出于美观目的将磁盘成本"按钮上移.

...you want to just lose the Browse button. But to avoid confusion, you will need to also alter the text on that dialog as well. Confirm the install folder instead of Select the install folder. And you need to modify the text that tells people to click Browse. And then probably move the Disk Cost button up, just for aesthetic purposes.

这些是更改:

These are the changes:

您想要的结果是这样的:

And the result you want is this:

要在Orca中手动执行此操作,只需在控制"表中进行一些更改:

To do that manually in Orca, you need only to make a few changes in the Control table:

  1. 删除行 其中Dialog _ ="FolderForm"和control ="BrowseButton"
  2. 设置Control_Next ="DiskCostButton", 属性= 5 其中Dialog _ ="FolderForm"和 Control ="FolderEdit"
  3. 设置Y = 126 其中Dialog _ ="FolderForm"和 Control ="DiskCostButton"
  4. set Text ='{\ VSI_MS_Sans_Serif16.0_1_0}确认安装文件夹...' 其中Dialog _ ="FolderForm"和 Control ="BannerText"
  5. set Text ='{\ VSI_MS_Sans_Serif13.0_0_0}安装程序会将[ProductName]安装到 以下文件夹.要安装在此文件夹中,请单击下一步". 其中Dialog _ ="FolderForm"和 Control ="Body"
  1. Delete row where Dialog_="FolderForm" and control="BrowseButton"
  2. set Control_Next = "DiskCostButton", Attributes = 5 where Dialog_="FolderForm" and Control="FolderEdit"
  3. set Y=126 where Dialog_="FolderForm" and Control="DiskCostButton"
  4. set Text='{\VSI_MS_Sans_Serif16.0_1_0}Confirm the Installation Folder...' where Dialog_="FolderForm" and Control="BannerText"
  5. set Text = '{\VSI_MS_Sans_Serif13.0_0_0}The installer will install [ProductName] to the following folder. To install in this folder, click "Next".' where Dialog_="FolderForm" and Control="Body"


要自动执行这些更改,您可以编写Javascript模块这个答案,但改用上述更改.


To automate these changes, you can write a Javascript module, as described in this answer, but using the changes described above, instead.

这篇关于Visual Studio 2008安装项目,修复了已安装工具包的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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