2009-08-16 126 views
5

我是WIX的新手。和我一起。WIX安装程序:添加POS作为先决条件

我想安装Microsoft POS (Point of service)与我的安装程序,安装.NET FX,SQL Server精简版等

我愿意提供与安装程序(无需从网上得到它)下载的EXE之后。我找到了link。链接中的文章表明您需要使用一些参数调用安装程序。 但我不知道如何做到这一点聪明。其次,我不确定这是否正确。 (可能需要合并模块?)

有人知道吗?

感谢 阿里尔

回答

4

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

+0

是的,它创建了一个MSI - 但你仍然可以调用外部应用程序,即使那些只是EXE的。当然,合并模块将是首选的方式,但如果只有EXE可用,也可以通过自定义操作调用! – 2009-08-16 14:38:43

+2

如果这个EXE实际上是一个启动MSI的引导程序,那就不行了。我的理解是,POS安装程序实际上是一个引导程序...但是,我可能是错的。 – Nestor 2009-08-16 15:35:01

+0

啊是的 - 好点。如果POS安装确实是一个MSI,那么你必须为DotNetInstaller链接拥有一个合并模块 – 2009-08-16 15:47:04

0

如果您无法获得合并模块(如果该产品可供发行商使用,那么这将是首选解决方案),您可以在安装时包含EXE,然后在您的WiX安装过程中将其作为自定义操作。

excellent tutorial on WiX在特拉蒙塔纳,这里有一个page on custom actions以及如何对其进行设置 - 你基本上需要在维克斯文件中定义<CustomAction>元素,并指定该怎么办时,它的执行:

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

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

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

这将引用一个二进制文件(例如EXE),您在您的WiX的安装包包括(MSI或CAB),但是这没有被安装作为安装的一部分,而这被提取为二进制文件。

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

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

这里,自定义操作称为LaunchFile会后执行安装已经完成,但只有在确定该应用程序尚未安装的情况下。

所以,我想你应该可以做你在WiX的自定义操作中所做的努力 - 请参阅WiX 2.0 documentationSteven Bone's blog post series了解更多信息。

希望这会有所帮助!

Marc

+0

在安装程序已经运行时,您无法使用它。这是一种情况:POS安装程序是一个调用Windows安装程序的exe包装程序,因此您不能在另一次安装期间将exe用作自定义操作。 – 2009-08-16 20:32:35

0

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

运行InstallerEditor.exe并打开示例xml文件,将其修改为适合您的使用,然后像这样运行InstallerLinker.exe: InstallerLinker.exe/Configuration:“c:\ path \ to \ your \ prod。XML “/输出: ”C:\工作\ 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> 
1

我最近这个问题陷入困境,而试图提供POS for .NET在WiX引导程序中,POS for .NET可执行文件并不是很有用,特别是当它试图将它作为另一个安装程序的静默安装提供时,我发现解决此问题的最佳方法是提供。POS在一个更友好的自定义的自解压可执行文件.NET这是为我工作的解决方案:

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

    的Setup.exe/ADDLOCAL运行时,POSDM

  8. 进入了“模式”选项卡,并确保“解压到临时文件夹”是选中“无声模式”下的“全部隐藏”
  9. 单击确定两次,WinRAR会将您的设置添加到可执行文件。
以上步骤将允许您以“引导程序友好”方式打包POS for .NET,现在可以将其作为您的软件包中的一个ExePackage元素进行包含,并将以无提示的方式进行安装。

希望这可以帮助别人。

+1

你需要更多的赞扬! – 2013-09-13 20:15:21

相关问题