简体   繁体   English

如何强制Visual Studio MSI包覆盖更新的文件?

[英]How to force the Visual Studio MSI Package to overwrite an updated file?

this is my first post here. 这是我在这里的第一篇文章。

I'm with a big problem here. 我这里有个大问题。 I have a 1.0.0 application that installs an Access Database into the user's machine. 我有一个1.0.0应用程序,它将Access数据库安装到用户的计算机中。 I have also a 1.0.1 version that needs to be released, and it has an new database file that i want to be installed overwriting the old file . 我也有一个1.0.1版本需要发布,它有一个新的数据库文件,我想安装它覆盖旧文件。 Unfortunately, if the user does any update to the old file, the 1.0.1 version does not overwrite it anymore, and i did not find in any place how to force this file to be deleted or overwrited after being updated. 不幸的是,如果用户对旧文件进行了任何更新,那么1.0.1版本将不再覆盖它,而且我在任何地方都没有找到如何强制更新后删除或覆盖该文件的方法。

Can you guys help me with this? 你们能帮我吗? Thanks and best regards 谢谢和最好的问候

Oy vey, such a headache I had with this one. Oy vey,我对此非常头痛。

Basically, you can try something like: 基本上,您可以尝试类似:

msiexec.exe /i yourmsi.msi REINSTALLMODE=omus

here's some helpful information . 这是一些有用的信息

Honestly, we ended up using InstallShield, it was simpler and worth the money. 老实说,我们最终使用了InstallShield,它更简单并且物有所值。 Good luck! 祝好运!

Since you mentioned Orca is your reply to matt's answer , you can make the access database a Companion File by editing the Version column in the File table : 由于您提到Orca是对matt答案的答复 ,因此您可以通过编辑File表中Version列,将访问数据库作为Companion File

The installation state of a companion file depends not on its own file versioning information, but on the versioning of its companion parent. 伴随文件的安装状态不取决于其自己的文件版本信息,而是取决于其伴随父文件的版本。 See the File Versioning Rules . 请参阅文件版本控制规则 To specify a companion file, the primary key of the companion parent in the File table must be authored into the Version column of the record for the companion. 若要指定伴随文件,必须在“ 文件”表中将伴随父项的主键创作到伴随记录的“版本”列中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在Visual Studio生成的MSI中更改.InstallState文件的位置 - How can I change the location of an .InstallState file in a Visual Studio generated MSI 如何强制在 Visual Studio 2013 中打开解决方案文件 (SLN)? - How to force a Solution file (SLN) to be opened in Visual Studio 2013? 如何强制 Visual Studio 在编译时检查损坏的文件引用 - How to force visual studio to check for broken file references at compile time 如何强制NLog覆盖日志文件 - How to force NLog to overwrite the log file 如何添加添加一些MSI应用程序到Visual Studio InstallShield Redistributables? - How to add add some msi application to visual studio InstallShield Redistributables? Visual Studio安装程序项目不会覆盖输出的.EXE文件 - Visual Studio installer project does not overwrite output .EXE file 将.exe文件打包到msi文件中 - Package a .exe file with in a msi file 如何在Visual Studio中调试时强制执行异常? - How to force an exception while debugging in Visual Studio? 如何强制Visual Studio在https中运行网站 - How to Force Visual Studio to Run Website in https 如何强制Visual Studio引用本地企业库DLL文件而不是已安装的dir文件 - How to force Visual Studio to reference local Enterprise Library DLL file instead of installed dir file
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM