I have an installer that will install the following shortcuts. The shortcuts are supposed to be installed in the C:\ProgramData\Microsoft\Windows\Start Menu\Programs\MyAPPFolder . But the issue is that a temporary shortcut will also create in the Start Menu and if I click on that the shortcut will disappear. I don't want the shortcut to be appear in the Start menu and want it to appear only in MyAPPFolder and should uninstall everything while uninstalling the installer. Also if i remove the Advertise=yes from my code this issue won't come but this time the shortcuts won't get uninstalled correctly.
ProgramMenu
MyAPPFolder
Shortcut1Advertise
Shortcut2Advertise
Shortcut3Advertise
Shortcut3Advertise
enter
The code for installling the shortcut is given below.
<ComponentGroup Id="Shortcuts_Component_Group1" Directory="test">
<Component Id="cmpShortcuts1" Guid="{0CD394A2-1D7B-44A0-A85A-EC17E2816BDD}">
<File Id="File1" Name="File.test" KeyPath="yes" Vital="no" DiskId="1" Source="$(var.Test_File_Path)File.test" >
<Shortcut Id="Shortcut1Advertiseid" Directory="MyAPPFolder" Name="Shortcut1Advertise" ShortName="Test1" Description="Shortcut1Advertise" Arguments="/x test1" Icon="test.ico" WorkingDirectory="test" Advertise="yes"/>
<Shortcut Id="Shortcut2Advertiseid" Directory="MyAPPFolder" Name="Shortcut2Advertise" ShortName="Test2" Description="Shortcut2Advertise" Arguments="/x test2" Icon="test.ico" WorkingDirectory="test" Advertise="yes"/>
</File>
</Component>
<Component Id="cmpShortcuts2" Guid="F9032ED8-2F25-4852-B437-38AE61EE7F57">
<File Id="File2" Name="File2.test" KeyPath="yes" Vital="no" DiskId="1" Source="$(var.test_File_Path)\File2.test">
<Shortcut Id="Shortcut3Advertiseid" Directory="MyAPPFolder" Name="Shortcut3Advertise" ShortName="Test1" Description="Shortcut3Advertise" Arguments="/x test3" Icon="test.ico" WorkingDirectory="test" Advertise="yes"/>
<Shortcut Id="Shortcut1Advertiseid" Directory="MyAPPFolder" Name="Shortcut4Advertise" ShortName="Test1" Description="Shortcut4Advertise" Arguments="/x test4" Icon="test.ico" WorkingDirectory="test" Advertise="yes"/>
</File>
</Component>
</ComponentGroup>