如何确保将MSI项目内置到与特定msiexec版本兼容的软件包中?

时间:2022-04-24 20:46:22

I have a windows installer (MSI) project. I want to ensure that when i build it , it will be compatible with msiexec version 4.5.

我有一个Windows安装程序(MSI)项目。我想确保在构建它时,它将与msiexec 4.5版兼容。

2 个解决方案

#1


Normally, compatibility is a problem with a lower verions. Windows Installer 4.5 is the latest version of windows installer and I would expect it to be backward compatible. So, most likely things that you are using will be supported.

通常,兼容性是较低版本的问题。 Windows Installer 4.5是Windows安装程序的最新版本,我希望它是向后兼容的。因此,很可能会支持您正在使用的内容。

What you should worry about is compatibility with older versions of Windows Installer. Most IDEs for creating installers would let you know if you are using something that is available only after some version of Windows Installer onwards.

您应该担心的是与旧版Windows Installer的兼容性。大多数用于创建安装程序的IDE会告诉您是否使用了某些版本的Windows Installer以后才能使用的内容。

If your IDE does not provide this feature then you should be aware of what all you are using in your MSI and make sure thats its available in the Windows Installer version you intend to you target with your installer.

如果您的IDE没有提供此功能,那么您应该知道您在MSI中使用的是什么,并确保它在您打算使用安装程序定位的Windows Installer版本中可用。

#2


That depends on the tool you use to build the MSI, you should be able to specify the required installer version there.

这取决于您用于构建MSI的工具,您应该能够在那里指定所需的安装程序版本。

For example, WIX, which I frequently use has a "InstallerVersion" attribute at its "Package" XML Element. There I can specify which Windows Installer Version is required.

例如,我经常使用的WIX在其“Package”XML元素上有一个“InstallerVersion”属性。在那里,我可以指定需要哪个Windows Installer版本。

(Currently I do not require Installer 4.5 as it isn't deployed everywhere yet and I don't want to require customers to install the new installer on XP.)

(目前我不需要安装程序4.5,因为它尚未部署到任何地方,我不想要求客户在XP上安装新的安装程序。)

Update:

Re-reading your question I get the impression that you use a Visual Studio Installer project. I believe you can't configure the Windows Installer Version there, but it defaults to Windows Installer 3.whatever (I'm not sure about the specific minor version). Setups created with that are compatible with Windows XP in any way.

重新阅读您的问题我得到您使用Visual Studio Installer项目的印象。我相信您无法在那里配置Windows Installer版本,但它默认为Windows Installer 3.whatever(我不确定具体的次要版本)。使用它创建的设置以任何方式与Windows XP兼容。

I don't believe you WANT to require a newer version of Windows Installer when you use a Visual Studio setup project, as the setup project is very limited in what it can do. So to require a newer version of the installer you probably have a specific feature in mind (for example elevation on Vista). To use that feature you'd need a better tool to build installers anyways (like WIX, or Installshield or Wise or ...)

我不相信您在使用Visual Studio安装项目时需要更新版本的Windows Installer,因为安装项目的功能非常有限。因此,要获得更新版本的安装程序,您可能会考虑特定功能(例如Vista上的提升)。要使用该功能,您需要一个更好的工具来构建安装程序(如WIX,或Installshield或Wise或......)

#1


Normally, compatibility is a problem with a lower verions. Windows Installer 4.5 is the latest version of windows installer and I would expect it to be backward compatible. So, most likely things that you are using will be supported.

通常,兼容性是较低版本的问题。 Windows Installer 4.5是Windows安装程序的最新版本,我希望它是向后兼容的。因此,很可能会支持您正在使用的内容。

What you should worry about is compatibility with older versions of Windows Installer. Most IDEs for creating installers would let you know if you are using something that is available only after some version of Windows Installer onwards.

您应该担心的是与旧版Windows Installer的兼容性。大多数用于创建安装程序的IDE会告诉您是否使用了某些版本的Windows Installer以后才能使用的内容。

If your IDE does not provide this feature then you should be aware of what all you are using in your MSI and make sure thats its available in the Windows Installer version you intend to you target with your installer.

如果您的IDE没有提供此功能,那么您应该知道您在MSI中使用的是什么,并确保它在您打算使用安装程序定位的Windows Installer版本中可用。

#2


That depends on the tool you use to build the MSI, you should be able to specify the required installer version there.

这取决于您用于构建MSI的工具,您应该能够在那里指定所需的安装程序版本。

For example, WIX, which I frequently use has a "InstallerVersion" attribute at its "Package" XML Element. There I can specify which Windows Installer Version is required.

例如,我经常使用的WIX在其“Package”XML元素上有一个“InstallerVersion”属性。在那里,我可以指定需要哪个Windows Installer版本。

(Currently I do not require Installer 4.5 as it isn't deployed everywhere yet and I don't want to require customers to install the new installer on XP.)

(目前我不需要安装程序4.5,因为它尚未部署到任何地方,我不想要求客户在XP上安装新的安装程序。)

Update:

Re-reading your question I get the impression that you use a Visual Studio Installer project. I believe you can't configure the Windows Installer Version there, but it defaults to Windows Installer 3.whatever (I'm not sure about the specific minor version). Setups created with that are compatible with Windows XP in any way.

重新阅读您的问题我得到您使用Visual Studio Installer项目的印象。我相信您无法在那里配置Windows Installer版本,但它默认为Windows Installer 3.whatever(我不确定具体的次要版本)。使用它创建的设置以任何方式与Windows XP兼容。

I don't believe you WANT to require a newer version of Windows Installer when you use a Visual Studio setup project, as the setup project is very limited in what it can do. So to require a newer version of the installer you probably have a specific feature in mind (for example elevation on Vista). To use that feature you'd need a better tool to build installers anyways (like WIX, or Installshield or Wise or ...)

我不相信您在使用Visual Studio安装项目时需要更新版本的Windows Installer,因为安装项目的功能非常有限。因此,要获得更新版本的安装程序,您可能会考虑特定功能(例如Vista上的提升)。要使用该功能,您需要一个更好的工具来构建安装程序(如WIX,或Installshield或Wise或......)