2010-09-16 237 views
0

我想在我的程序菜单中添加一个快捷方式。我想:Wix:添加不在子文件夹中的快捷方式!

<Component Id='myId' Guid='E4DED108-0129-4a5b-83FE-C9D1E3025B00'> <File Id='MyFileID' Name='Prog.exe' DiskId='1' Source='.\Prog.exe' KeyPath='yes'> <Shortcut Id='myShortcut' Name='Prog' Icon='MyIcon.exe' IconIndex='0' Directory='ProgramMenuDir' Advertise='yes' /> </File> </Component> 但安装程序添加快捷方式中的子文件夹中的程序菜单!为什么和我能做些什么来避免这种情况?

由于米莎

回答

2

你可以尝试改变目录=“ProgramMenuDir”到目录=“ProgramMenuFolder”,否则让一个单独的快捷方式组件;

<Directory Id="TARGETDIR" Name="SourceDir"> 
    <Directory Id="ProgramMenuFolder"> 
    <Component Id="Shortcuts" Guid="{}"> 
     <Shortcut Id='myShortcut' Name='Prog' Icon='MyIcon.exe' IconIndex='0' Directory='ProgramMenuFolder' WorkingDirectory='INSTALLDIR' Target="[INSTALLDIR]Prog.exe" /> 
     <RegistryValue Root='HKCU' Key='SOFTWARE\prog\prog' Type='string' Value='1' KeyPath='yes' /> 
    </Component> 
    </Directory> 

    <!-- other files --> 
</Directory> 
相关问题