|
I haven't had the time to test the structure, in my Wix Directory project at home, but from the top of my head the directory structure should look something like this <Directory> <Directory> <Directory .. > <Component ... > <File ... > <Shortcut Directory="StartupFolder" ...> <Icon ... /> </Shortcut> </File> </Component> </Directory> <!-- ADD THIS --> <Directory ...> <Directory ... /> </Directory> </Directory> </Directory>** UPDATE ** By default, the Fragment containing the Directory structure is right after the product element. In the Fragment that declares the directory structure required for your installation, you will add the directory reference to the Start Up folder under windows. After, you must create the component that will instruct it to take a file and create a ShortCut in the directory that you pass as reference (Start Up Folder). When the installer launches, it will copy the short cut to the file specified in the directory that you referenced. ** FROM YOUR SOURCE ** In the fragment that has your product components add this declaration <DirectoryRef> <Component Guid="{BCC2E481-53AF-4690-912D-1051B930B910}"> <Shortcut Description="DMC HELLO" WorkingDirectory="INSTALLDIR" /> <RegistryKey Root="HKLM" Key="DMC\HelloWorld" Action="createAndRemoveOnUninstall"> <RegistryValue Type="integer" Value="1" KeyPath="yes" /> </RegistryKey> </Component> </DirectoryRef>In the Feature tag under product add the reference to your new component so now your product declaration will look like this <Product Language="1033" Version="1.0.0.0" Manufacturer="DMC" UpgradeCode="808c333f-09f7-45d5-a5ab-ea104c500f2b"> <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" /> <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." /> <MediaTemplate /> <Feature Level="1"> <ComponentGroupRef /> <ComponentGroupRef /> </Feature> </Product>That will copy a shortcut to your start-up folder for your machine. ADJUSTMENTS This: <ComponentGroupRef />Should Be <ComponentRef />This: <!-- ADD THIS --> <Directory ...> <Directory ... /> </Directory>Should be: <Directory ...> </Directory>That should fix your two errors (责任编辑:) |
