Suppose that, I have a .ico file, named hand.ico. I will use this file to represent for Desktop shortcut and Start Menu shortcut.
1. Add icon for Desktop shortcut.
In the Product.wxs file, find lines of code that say:<Shortcut Id="ApplicationDesktopShortcut"Replace it with the following lines of code:
Name="AutoClick_FirstBlood"
Target="[INSTALLFOLDER]AutoClick_FirstBlood.exe"
WorkingDirectory="INSTALLFOLDER" />
<Shortcut Id="ApplicationDesktopShortcut"
Name="AutoClick_FirstBlood"
Target="[INSTALLFOLDER]AutoClick_FirstBlood.exe"
WorkingDirectory="INSTALLFOLDER"
Icon="handIcon1">
<Icon Id="handIcon1" SourceFile="C:\FilesToAdd\icon\hand.ico"/>
</Shortcut>
2. Add icon for Start Menu shortcut
In the Product.wxs file, find lines of code that say:<Shortcut Id="ApplicationStartMenuShortcut"Replace it with the following lines of code:
Name="AutoClick_FirstBlood"
Description="AutoClick_FirstBlood - an simple application about mouse events."
Target="[INSTALLFOLDER]AutoClick_FirstBlood.exe"
WorkingDirectory="INSTALLFOLDER" />
<Shortcut Id="ApplicationStartMenuShortcut"
Name="AutoClick_FirstBlood"
Description="AutoClick_FirstBlood - an simple application about mouse events."
Target="[INSTALLFOLDER]AutoClick_FirstBlood.exe"
WorkingDirectory="INSTALLFOLDER"
Icon="handIcon2">
<Icon Id="handIcon2" SourceFile="C:\FilesToAdd\icon\hand.ico"/>
</Shortcut>
Không có nhận xét nào:
Đăng nhận xét