5

在安装 .net fx、sql server compact edition 等之后,我希望使用我的安装程序安装Microsoft POS(服务点) 。

我愿意为下载的 exe 提供安装程序(无需从网上获取)。

我找到了这个链接。链接中的文章表明您需要使用一些参数调用设置。但我不知道如何明智地做到这一点。其次,我不确定这也是正确的方法。(也许需要一个合并模块?)

有人知道吗?

4

4 回答 4

4

Wix 生成 MSI 文件,您无法从 MSI 内部启动安装程序。如果您找到 POS 的合并模块,您可以将其包含在您的 Wix 中。否则,您必须先使用引导程序安装 POS,然后启动您的 MSI(如DotNetInstaller)。

于 2009-08-16T13:34:42.090 回答
1

我最近在尝试在 WiX 引导程序中为 .NET 提供 POS 时遇到了这个问题。开箱即用的 .NET 可执行文件的 POS 并不是很有帮助,尤其是在尝试从另一个安装程序提供它作为静默安装时。我发现解决此问题的最佳方法是在更友好的自定义自解压可执行文件中为 .NET 提供 POS。这是对我有用的解决方案:

  1. 运行 POS for .NET 可执行文件并将文件解压缩到本地目录。
  2. 突出显示解压缩目录中的所有文件和文件夹,然后使用 WinRAR,单击“添加到存档...”
  3. 在弹出的窗口中单击浏览以选择您的输出文件将保存到的位置并将存档名称更改为更友好的名称(可选)。
  4. 单击存档选项部分下的“创建 SFX 存档”;单击确定,将在您指定的位置生成一个可执行文件。
  5. 右键单击新的可执行文件并选择“使用 WinRAR 打开”。
  6. 单击顶部的 SFX 图标,然后单击“高级 SFX 选项”。
  7. 在“设置”选项卡下,转到“提取后运行”并输入:

    Setup.exe /ADDLOCAL 运行时,Posdm

  8. 转到“模式”选项卡并确保选中“解压到临时文件夹”,并在“静音模式”下选择“全部隐藏”
  9. 单击确定两次,WinRAR 会将您的设置添加到可执行文件中。
按照上述步骤,您可以以“引导程序友好”的方式为 .NET 打包 POS,现在可以将其作为 ExePackage 元素包含在您的捆绑包中,以静默方式安装。

希望这可以帮助某人。

于 2013-04-10T15:29:48.457 回答
0

如果您无法获得合并模块(如果该项目由发布者提供,这将是首选解决方案),您可以在安装中包含一个 EXE,然后在您的 WiX 安装期间作为自定义操作执行它。

来自Tramontana上关于 WiX 的优秀教程,这里有一个关于自定义操作以及如何设置它们的页面 - 您基本上需要<CustomAction>在 WiX 文件中定义一个元素并指定执行时要执行的操作:

<CustomAction Id='LaunchFile' FileKey='FoobarEXE' ExeCommand='' Return='asyncNoWait' />

这将启动您刚刚作为应用程序的一部分安装的文件,该文件在您的 WiX 脚本中引用为FoobarEXE.

<CustomAction Id='LaunchFile' BinaryKey='FoobarEXE' ExeCommand='' Return='asyncNoWait' />

这将引用您包含在 WiX 安装包(MSI 或 CAB)中的二进制文件(例如 EXE),但该文件并未作为安装的一部分进行安装,而是作为二进制文件解压缩。

一旦你知道你会做什么,你需要在安装步骤的序列中定义什么时候应该执行这个自定义操作:

<InstallExecuteSequence>
  ...
  <Custom Action='LaunchFile' After='InstallFinalize'>NOT Installed</Custom>
</InstallExecuteSequence>

在这里,调用的自定义操作LaunchFile将在安装完成后执行,但前提是确定应用程序尚未安装。

所以,我想,您应该能够使用 WiX 中的自定义操作来完成您正在努力做的事情 - 请参阅WiX 2.0 文档Steven Bone 的博客文章系列以获取更多信息。

希望这可以帮助!

马克

于 2009-08-16T14:49:42.193 回答
0

您使用 dotnetinstaller,附件是一个示例 xml 文件。

运行 InstallerEditor.exe 并打开示例 xml 文件,修改它以适合您的使用,然后像这样运行 InstallerLinker.exe:InstallerLinker.exe /Configuration:"c:\path\to\your\prod.xml" /Output:" c:\work\ setup.exe" /t:"%DOTNETINSTALLER%\Bin\dotNetInstaller.exe" /v

<?xml version="1.0" encoding="utf-8"?>
<configurations lcid_type="UserExe" show_language_selector="False" language_selector_title="" language_selector_ok="OK" language_selector_cancel="Cancel" configuration_no_match_message="" ui_level="full" fileversion="" productversion="" log_enabled="True" log_file="#APPPATH\YourPackageInstallLog.txt">
  <schema version="1.10.1525.0" generator="dotNetInstaller InstallerEditor" />
  <fileattributes>
    <fileattribute name="FileDescription" value="YourPackage Installer" />
    <fileattribute name="CompanyName" value="MyCompany Design" />
    <fileattribute name="FileVersion" value="%RESOLVEVERSION%" />
  </fileattributes>
  <configuration dialog_caption="YourPackage Installer" dialog_message="In order to install YourPackage you must install these components:" dialog_message_uninstall="" dialog_bitmap="#APPPATH\banner.bmp" skip_caption="Skip" install_caption="Install" uninstall_caption="Uninstall" cancel_caption="Close" status_installed=" (Installed)" status_notinstalled="" failed_exec_command_continue="Failed to install %s. Continue with others components?" installation_completed="YourPackage installed successfully!" uninstallation_completed="YourPackage uninstalled successfully!" installation_none="YourPackage is already installed!" uninstallation_none="YourPackage is not installed!" installing_component_wait="Installing %s. Wait, this operation could take some time ..." uninstalling_component_wait="Uninstalling %s. Wait, this operation could take some time ..." reboot_required="To continue the installation you must restart your computer. Restart now?" must_reboot_required="False" dialog_otherinfo_caption="" dialog_otherinfo_link="" complete_command="" complete_command_silent="" complete_command_basic="" wait_for_complete_command="True" auto_close_if_installed="True" auto_close_on_error="False" reload_on_error="True" dialog_show_installed="True" dialog_show_uninstalled="True" dialog_show_required="True" cab_dialog_message="%s" cab_cancelled_message="" cab_dialog_caption="" cab_path="#TEMPPATH\#GUID" cab_path_autodelete="True" dialog_default_button="cancel" dialog_position="" dialog_components_list_position="" dialog_message_position="" dialog_bitmap_position="" dialog_otherinfo_link_position="" dialog_osinfo_position="" dialog_install_button_position="" dialog_cancel_button_position="" dialog_skip_button_position="" auto_start="False" auto_continue_on_reboot="False" reboot_cmd="" show_progress_dialog="True" show_cab_dialog="True" type="install" lcid_filter="" language_id="" language="" os_filter="" os_filter_min="win7" os_filter_max="win7" processor_architecture_filter="" supports_install="True" supports_uninstall="True">
    <component package="#CABPATH\%CUDATOOLKITPACKAGE%" cmdparameters="/passive" cmdparameters_silent="/qn" cmdparameters_basic="/qb-" uninstall_package="" uninstall_cmdparameters="/qb-" uninstall_cmdparameters_silent="/qn" uninstall_cmdparameters_basic="/qb-" id="%CUDATOOLKITPACKAGE%" display_name="%CUDATOOLKITPACKAGE%" uninstall_display_name="" os_filter="" os_filter_min="win7" os_filter_max="win7" os_filter_lcid="" type="msi" installcompletemessage="" uninstallcompletemessage="" mustreboot="False" reboot_required="" must_reboot_required="False" failed_exec_command_continue="" allow_continue_on_error="True" default_continue_on_error="False" required_install="False" required_uninstall="False" selected_install="True" selected_uninstall="False" note="" processor_architecture_filter="x64" status_installed="" status_notinstalled="" supports_install="True" supports_uninstall="False" show_progress_dialog="True" show_cab_dialog="True">
      <embedfile sourcefilepath="..\..\..\Prereqs\%CUDATOOLKITPACKAGE%" targetfilepath="%CUDATOOLKITPACKAGE%" />
      <installedcheck path="SOFTWARE\NVIDIA Corporation\GPU Computing Toolkit\CUDA" fieldname="VersionsInstalled" fieldvalue="%CUDATOOLKITVERSION%" defaultvalue="False" fieldtype="REG_MULTI_SZ" comparison="contains" rootkey="HKEY_LOCAL_MACHINE" wowoption="WOW64_64" type="check_registry_value" description="Installed Check" />
    </component>
    <component executable="#CABPATH\%POSTGRESQLPACKAGE%" executable_silent="" executable_basic="" install_directory="" responsefile_source="" responsefile_target="" responsefile_format="none" uninstall_executable="" uninstall_executable_silent="" uninstall_executable_basic="" uninstall_responsefile_source="" uninstall_responsefile_target="" returncodes_success="" returncodes_reboot="" exeparameters="--mode unattended --unattendedmodeui minimal --servicepassword YourProduct --superpassword YourProduct --superaccount postgres --serviceaccount postgres --debuglevel 4" exeparameters_basic="" exeparameters_silent="" uninstall_exeparameters="" uninstall_exeparameters_basic="" uninstall_exeparameters_silent="" id="%POSTGRESQLPACKAGE%" display_name="%POSTGRESQLPACKAGE%" uninstall_display_name="" os_filter="" os_filter_min="win7" os_filter_max="win7" os_filter_lcid="" type="exe" installcompletemessage="" uninstallcompletemessage="" mustreboot="False" reboot_required="" must_reboot_required="False" failed_exec_command_continue="" allow_continue_on_error="True" default_continue_on_error="False" required_install="False" required_uninstall="False" selected_install="True" selected_uninstall="False" note="" processor_architecture_filter="x64" status_installed="" status_notinstalled="" supports_install="True" supports_uninstall="False" show_progress_dialog="True" show_cab_dialog="True">
      <embedfile sourcefilepath="..\..\..\Prereqs\%POSTGRESQLPACKAGE%" targetfilepath="%POSTGRESQLPACKAGE%" />
      <installedcheck path="SOFTWARE\PostgreSQL\Installations\postgresql-x64-9.0" fieldname="Version" fieldvalue="%POSTGRESQLVERSION%" defaultvalue="False" fieldtype="REG_SZ" comparison="version_ge" rootkey="HKEY_LOCAL_MACHINE" wowoption="WOW64_64" type="check_registry_value" description="Installed Check" />
    </component>
    <component executable="#CABPATH\vcredist_x64.exe" executable_silent="" executable_basic="" install_directory="" responsefile_source="" responsefile_target="" responsefile_format="none" uninstall_executable="" uninstall_executable_silent="" uninstall_executable_basic="" uninstall_responsefile_source="" uninstall_responsefile_target="" returncodes_success="" returncodes_reboot="" exeparameters="/passive" exeparameters_basic="" exeparameters_silent="" uninstall_exeparameters="" uninstall_exeparameters_basic="" uninstall_exeparameters_silent="" id="vcredist_x64.exe" display_name="vcredist_x64.exe" uninstall_display_name="" os_filter="" os_filter_min="win7" os_filter_max="win7" os_filter_lcid="" type="exe" installcompletemessage="" uninstallcompletemessage="" mustreboot="False" reboot_required="" must_reboot_required="False" failed_exec_command_continue="" allow_continue_on_error="True" default_continue_on_error="False" required_install="False" required_uninstall="False" selected_install="True" selected_uninstall="False" note="" processor_architecture_filter="" status_installed="" status_notinstalled="" supports_install="True" supports_uninstall="False" show_progress_dialog="True" show_cab_dialog="True">
      <embedfile sourcefilepath="C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\vcredist_x64\vcredist_x64.exe" targetfilepath="vcredist_x64.exe" />
      <installedcheck path="SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\VC\VCRedist\x64" fieldname="Installed" fieldvalue="1" defaultvalue="False" fieldtype="REG_DWORD" comparison="match" rootkey="HKEY_LOCAL_MACHINE" wowoption="WOW64_64" type="check_registry_value" description="Installed Check" />
    </component>
    <component executable="#CABPATH\%QUICKTIMEPACKAGE%" executable_silent="" executable_basic="" install_directory="" responsefile_source="" responsefile_target="" responsefile_format="none" uninstall_executable="" uninstall_executable_silent="" uninstall_executable_basic="" uninstall_responsefile_source="" uninstall_responsefile_target="" returncodes_success="" returncodes_reboot="" exeparameters="/passive" exeparameters_basic="" exeparameters_silent="" uninstall_exeparameters="" uninstall_exeparameters_basic="" uninstall_exeparameters_silent="" id="%QUICKTIMEPACKAGE%" display_name="%QUICKTIMEPACKAGE%" uninstall_display_name="" os_filter="" os_filter_min="win7" os_filter_max="win7" os_filter_lcid="" type="exe" installcompletemessage="" uninstallcompletemessage="" mustreboot="False" reboot_required="" must_reboot_required="False" failed_exec_command_continue="" allow_continue_on_error="True" default_continue_on_error="False" required_install="False" required_uninstall="False" selected_install="True" selected_uninstall="False" note="" processor_architecture_filter="" status_installed="" status_notinstalled="" supports_install="True" supports_uninstall="False" show_progress_dialog="True" show_cab_dialog="True">
      <embedfile sourcefilepath="..\..\..\Prereqs\%QUICKTIMEPACKAGE%" targetfilepath="%QUICKTIMEPACKAGE%" />
      <installedcheck path="SOFTWARE\Apple Computer, Inc.\QuickTime" fieldname="Version" fieldvalue="%QUICKTIMEVERSION%" defaultvalue="False" fieldtype="REG_DWORD" comparison="version_ge" rootkey="HKEY_LOCAL_MACHINE" wowoption="WOW64_32" type="check_registry_value" description="Installed Check" />
    </component>
    <component package="#CABPATH\YourPackageInstaller.msi" cmdparameters="" cmdparameters_silent="/qn" cmdparameters_basic="/qb-" uninstall_package="" uninstall_cmdparameters="/qb-" uninstall_cmdparameters_silent="/qn" uninstall_cmdparameters_basic="/qb-" id="YourPackageInstaller.msi" display_name="YourPackageInstaller.msi" uninstall_display_name="" os_filter="" os_filter_min="win7" os_filter_max="win7" os_filter_lcid="" type="msi" installcompletemessage="" uninstallcompletemessage="" mustreboot="False" reboot_required="" must_reboot_required="False" failed_exec_command_continue="" allow_continue_on_error="False" default_continue_on_error="False" required_install="True" required_uninstall="True" selected_install="True" selected_uninstall="True" note="" processor_architecture_filter="x64" status_installed="" status_notinstalled="" supports_install="True" supports_uninstall="True" show_progress_dialog="True" show_cab_dialog="True">
      <embedfile sourcefilepath="YourPackageInstaller.msi" targetfilepath="YourPackageInstaller.msi" />
      <installedcheck path="SOFTWARE\MyCompany Design\YourProduct YourPackage" fieldname="Version" fieldvalue="%YOURVERSION%" defaultvalue="False" fieldtype="REG_SZ" comparison="version_ge" rootkey="HKEY_LOCAL_MACHINE" wowoption="WOW64_64" type="check_registry_value" description="Installed Check" />
    </component>
  </configuration>
</configurations>
于 2011-10-13T09:53:08.990 回答