如何在.msi中的Access文件中添加版本号 [英] How to add a version number to an Access file in a .msi

查看:196
本文介绍了如何在.msi中的Access文件中添加版本号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用VS 2003构建安装.该安装具有Excel工作簿和两个Access数据库.无论用户计算机上现有数据库的创建/修改日期如何,我都需要强制加载Access文件.我目前使用ORCA在这两个文件上使用版本号,但是想找到一个更简单,更优雅的解决方案(手动编辑.msi文件并不是我认为的最佳实践".

I'm building an install using VS 2003. The install has an Excel workbook and two Access databases. I need to force the Access files to load regardless of the create/mod date of the existing databases on the user's computer. I currently use ORCA to force in a Version number on the two files, but would like to find a simpler, more elegant solution (hand editing a .msi file is not something I see as "best practice".

是否可以使用Access将版本号添加到数据库中,然后在安装中使用版本号?

Is there a way to add a version number to the databases using Access that would then be used in the install?

我有更好的方法吗?

推荐答案

@LanceSc

我认为MsiFileHash表在这里没有帮助.请参见

I don't think MsiFileHash table will help here. See this excellent post by Aaron Stebner. Most likely last modified date of Access database on client computer will be different from its creation date. Windows Installer will correctly assume that the file has changed since installation and will not replace it.

解决此问题的正确方法(正如作者指出的那样)是在文件"表中设置版本"字段.

The right way to solve this (as question author pointed out) is to set Version field in File table.

不幸的是,Visual Studio中的安装项目非常有限.您可以创建简单的VBS脚本(使用SQL)来修改文件"表中的记录,但我建议改用替代的设置创作工具,例如

Unfortunately setup projects in Visual Studio are very limited. You can create simple VBS script that would modify records in File table (using SQL) but I suggest looking at alternative setup authoring tools instead, such as WiX, InstallShield or Wise. WiX in my opinion is the best.

这篇关于如何在.msi中的Access文件中添加版本号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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