<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <Product Id="*" UpgradeCode="dc26f3bc-741d-472d-af18-b8bd2e8349b0" Version="1.3.0.0" Language="1033" Name="MicronSync" Manufacturer="Rebound Software">
    <Package InstallerVersion="300" Compressed="yes"/>
    <Media Id="1" Cabinet="myapplication.cab" EmbedCab="yes" />
    <Icon Id="MicronSync.ico" SourceFile="C:\P4\MicronSync\MicronSync\MicronSync.ico"/>
    <Property Id="ARPPRODUCTICON" Value="MicronSync.ico" />
    <Property Id ="ARPNOMODIFY" Value="yes" Secure="yes" />

    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="ProgramFilesFolder">
        <Directory Id="APPLICATIONROOTDIRECTORY" Name="MicronSync"/>
      </Directory>
      <!-- Step 1: Define the directory structure -->
      <Directory Id="ProgramMenuFolder">
        <Directory Id="ApplicationProgramsFolder" Name="MicronSync"/>
      </Directory>
    </Directory>

    <DirectoryRef Id="APPLICATIONROOTDIRECTORY">
      <Component Id="MicronSync.exe" Guid="dc26f3bc-741d-472d-af18-b8bd2e8349b0">
        <File Id="MicronSync.exe" Source="C:\P4\MicronSync\MicronSync\bin\Release\MicronSync.exe" KeyPath="yes" Checksum="yes"/>
      </Component>
      <Component Id="Readme.txt" Guid="4ef6fd4e-8106-4a19-9221-77f5a08026b8">
        <File Id="Readme.txt" Source="C:\P4\MicronSync\MicronSync\bin\Release\Readme.txt" KeyPath="yes"/>
      </Component>
    </DirectoryRef>

    <!-- Step 2: Add the shortcut to your installer package -->
    <DirectoryRef Id="ApplicationProgramsFolder">
      <Component Id="ApplicationShortcut" Guid="50d2de0f-4c8e-449b-b0c4-f3f1a2747386">
        <Shortcut Id="ApplicationStartMenuShortcut"
            Name="MicronSync"
            Description="Create and restore backups to locations of your choice with ease. Save out settings used for fast and convenient control of your backups. All with an intuative to use interface designed for both control and simplicity."
            Target="[APPLICATIONROOTDIRECTORY]MicronSync.exe"
            WorkingDirectory="APPLICATIONROOTDIRECTORY"/>
        <Shortcut Id="ReadmeStartMenuShortcut"
            Name="Readme"
            Target="[APPLICATIONROOTDIRECTORY]Readme.txt"
            WorkingDirectory="APPLICATIONROOTDIRECTORY"/>
        <RemoveFolder Id="ApplicationProgramsFolder" On="uninstall"/>
        <RegistryValue Root="HKCU" Key="Software\Microsoft\MicronSync" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
      </Component>
    </DirectoryRef>

    <Feature Id="MainApplication" Title="Main Application" Level="1">
      <ComponentRef Id="MicronSync.exe" />
      <ComponentRef Id="Readme.txt" />
      <!-- Step 3: Tell WiX to install the shortcut -->
      <ComponentRef Id="ApplicationShortcut" />
    </Feature>
  </Product>
</Wix>