我是WIX的新手。和我一起。WIX安裝程序:添加POS作爲先決條件
我想安裝Microsoft POS (Point of service)與我的安裝程序,安裝.NET FX,SQL Server精簡版等
我願意提供與安裝程序(無需從網上得到它)下載的EXE之後。我找到了link。鏈接中的文章表明您需要使用一些參數調用安裝程序。 但我不知道如何做到這一點聰明。其次,我不確定這是否正確。 (可能需要合併模塊?)
有人知道嗎?
感謝 阿里爾
我是WIX的新手。和我一起。WIX安裝程序:添加POS作爲先決條件
我想安裝Microsoft POS (Point of service)與我的安裝程序,安裝.NET FX,SQL Server精簡版等
我願意提供與安裝程序(無需從網上得到它)下載的EXE之後。我找到了link。鏈接中的文章表明您需要使用一些參數調用安裝程序。 但我不知道如何做到這一點聰明。其次,我不確定這是否正確。 (可能需要合併模塊?)
有人知道嗎?
感謝 阿里爾
維克斯產生MSI文件,並且無法從MSI內啓動安裝程序。如果您找到POS的合併模塊,則可以將其包含在Wix中。否則,您必須先使用引導程序先安裝POS,然後啓動MSI(如DotNetInstaller)。
如果您無法獲得合併模塊(如果該產品可供發行商使用,那麼這將是首選解決方案),您可以在安裝時包含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 documentation和Steven Bone's blog post series瞭解更多信息。
希望這會有所幫助!
Marc
在安裝程序已經運行時,您無法使用它。這是一種情況:POS安裝程序是一個調用Windows安裝程序的exe包裝程序,因此您不能在另一次安裝期間將exe用作自定義操作。 – 2009-08-16 20:32:35
您使用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>
我最近這個問題陷入困境,而試圖提供POS for .NET在WiX引導程序中,POS for .NET可執行文件並不是很有用,特別是當它試圖將它作爲另一個安裝程序的靜默安裝提供時,我發現解決此問題的最佳方法是提供。POS在一個更友好的自定義的自解壓可執行文件.NET這是爲我工作的解決方案:
的Setup.exe/ADDLOCAL運行時,POSDM
希望這可以幫助別人。
你需要更多的讚揚! – 2013-09-13 20:15:21
是的,它創建了一個MSI - 但你仍然可以調用外部應用程序,即使那些只是EXE的。當然,合併模塊將是首選的方式,但如果只有EXE可用,也可以通過自定義操作調用! – 2009-08-16 14:38:43
如果這個EXE實際上是一個啓動MSI的引導程序,那就不行了。我的理解是,POS安裝程序實際上是一個引導程序...但是,我可能是錯的。 – Nestor 2009-08-16 15:35:01
啊是的 - 好點。如果POS安裝確實是一個MSI,那麼你必須爲DotNetInstaller鏈接擁有一個合併模塊 – 2009-08-16 15:47:04