Wix Installation option-Start Menu item

Source: Internet
Author: User

Reference: How to: create a shortcut cut on the Start Menu, how to: create an uninstall shortcut cut

After the installation program is created, you must generate an application menu on the Start Menu, which usually includes the quick entry for calling the application and uninstalling the application. Here is an example:

<? XML version = "1.0" encoding = "UTF-8"?> <Wix xmlns = "http://schemas.microsoft.com/wix/2006/wi"> <product ID = "a960cf35-0779-43e8-923b-35638f2bfc42" name = "minimal" Language = "2052" version = "1.0.0.0" Manufacturer = "geffzhang" upgradecode = "Courier"> <package installerversion = "200" compressed = "yes" Description = "minimal Windows Installer sample" Comments = "this installer database contains the logic and data required Install minimal Windows Installer sample. "/> <media id =" 1 "Cabinet =" media1.cab "embedcab =" yes "/> <property id =" enableev "value =" 1 "> </property> <condition message = "you must have the administrator privilege to install the application"> <! [CDATA [privileged]> </condition> <directory id = "targetdir" name = "sourcedir"> <directory id = "programfilesfolder"> <directory id = "installlocation" Name = "minimal"> <component id = "component1" guid = "{region}"> <createfolder/> <environment id = "testminvar" Action = "set" part = "All "Name =" minenvvar "permanent =" no "system =" yes "value =" 8 "/> <File ID =" file_payload "Source =" payloa D.txt "keypath =" yes "/> </component> <directory id =" GAC "name =" GAC "> <component id =" rtgactest "guid =" required "diskid = ""1"> <! -- Runtime, assembly in GAC --> <File ID = "f_rt_gactest" longname = "gactest. DLL "Source = ".. \ build \ gactest. DLL "keypath =" yes "assembly = ". net "/> </component> </directory> <component id =" dtgactest "guid =" FB935B7D-D2BD-4B83-A26C-A9376EBA0915 "diskid =" 1 "> <! -- Design-time, private assembly --> <File ID = "f_dt_gactest" longname = "gactest. DLL "Source = ".. \ build \ gactest. DLL "keypath =" yes "/> <registry id =" r_dt_mycontrol_assemblyfolders "root =" HKLM "Key =" SOFTWARE \ Microsoft \. netframework \ assemblyfolders \ [productname] "value =" [$ dtgactest] "type =" string "/> </component> </directory> <directory id =" programmenufolder "> <directory id =" minimalstartmenufolder "name =" minimal "> <component id =" startmenufolder "guid =" B3AEC4C4-3F8E-4865-B87A-B750533776B5 "> <shortcut id =" applicationstartmenushortcut "name =" minimal test "target =" Your installlocationyour payload.txt "workingdirectory =" installlocation "/> <your cut id =" uninstallproduct "name =" Uninstall minimal "Description =" uninstils my application "target =" Your system64folderyour msiexec.exe "arguments = "/X [productcode]"/> <removefolder id = "applicationprogramsfolder" on = "Uninstall"/> <registryvalue root = "hkcu" Key = "SOFTWARE \ Microsoft \ myapplicationname" name = "installed" type = "integer" value = "1" keypath = "yes"/> </component> </directory> <feature id = "productfeature" Title = "minimal" level = "1"> <componentref id = "component1"/> <componentref id = "dtgactest"/> <componentref id = "rtgactest "/> <componentref id =" startmenufolder "/> </feature> <property id =" wixui_installdir "value =" installlocation "/> <uiref id =" wixui_installdir "/> <UI/> </product> </Wix>

In the preceding example, the content of the Start menu item is as follows:

<Directory id = "programmenufolder"> <directory id = "minimalstartmenufolder" name = "minimal"> <component id = "startmenufolder" guid = "B3AEC4C4-3F8E-4865-B87A-B750533776B5"> <shortcut id = "applicationstartmenushortcut ""Name =" minimal test "target =" Your installlocationyour payload.txt "workingdirectory =" installlocation "/> <your cut id =" uninstallproduct "name =" Uninstall minimal "Description =" uninstallmy application "Target = "maid"/X [productcode] "/> <removefolder id =" applicationprogramsfolder "on =" Uninstall "/> <registryvalue root =" hkcu "Key =" Software \ Microsoft \ myapplicationname "name =" installed "type =" integer "value =" 1 "keypath =" yes "/> </component> </directory> </directory> the Start menu item and the application to be installed must be separated and placed in different directories, programmenufolder is a standard Windows Start Menu, and the second directory will be a menu item created under the Windows Start Menu. we name it
The shortcut menu includes three elements: the component element is the atomic unit of the WIX installation element, and the shortcut cut under the component element is the shortcut menu item, the removefolder element ensures that the app is uninstalled
Perform related cleanup. In the preceding example, there are two shortcuts: Minimal test and uninstall minimal, which are the menu items displayed in the Windows Start Menu.
The Windows Installer system64folder attribute is resolvedSystem32Directory, which is resolvedSyswow64Directory.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.