Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect source in "creating shortcut" documentation #4869

Closed
wixbot opened this issue Aug 27, 2015 · 5 comments
Closed

Incorrect source in "creating shortcut" documentation #4869

wixbot opened this issue Aug 27, 2015 · 5 comments
Assignees
Labels
Milestone

Comments

@wixbot
Copy link

wixbot commented Aug 27, 2015

This location has a slightly incorrect RemoveFolder tag. The listing states

Code
      <RemoveFolder Id="ApplicationProgramsFolder" On="uninstall"/>

When it should read

Code
      <RemoveFolder Id="RemoveShortcut" Directory="ApplicationProgramsFolder" On="uninstall"/>

No big deal, but it took me a couple hours to figure out how to get ice38 to shut up

Originally opened by tima

@wixbot
Copy link
Author

wixbot commented Aug 27, 2015

Oh ya, should there be a remove registry on uninstall for the registry key created in this same example?

Originally posted by tima

@wixbot
Copy link
Author

wixbot commented Sep 1, 2015

AssignedTo set to bobarnson
Release changed from v4.x to v3.11

@wixbot
Copy link
Author

wixbot commented Sep 1, 2015

The directory should default to the parent Component/@Directory. Did it not?

Originally posted by heaths
Status changed from Open to Untriaged

@wixbot
Copy link
Author

wixbot commented Sep 1, 2015

I'd like to also submit a different way of doing the shortcut that doesn't involve the registry entry thing. I'll just cut/copy/paste this directly out of my install but I think you'll understand what I'm driving at. Use the installed EXE as the key file instead of creating a registry entry

Code
  <!-- this is in the directory section -->

  <!-- Theoretically the desktop folder -->
  <Directory Id="DesktopFolder" Name="Desktop" />

  <!-- This is the actual menu item that ends up off the start menu -->
  <!-- Menu folder, just the folder -->
  <!-- Install and uninstall the actual item off of the main exe -->
  <!-- you don't have to do that registry thing if you key if off of the exe component -->
  <Directory Id="ProgramMenuFolder">
    <Directory Id="ApplicationProgramsFolder" Name="Predator PDM v11" />
  </Directory>

Then use the main EXE as the key file

Code<Component Id="cmp5D05F9153EB11A2F294EB7FE12DB2584" Guid="REPLACE">
    <File Id="filEFE0ED51864D3FBDCD486BCFC0985F99" KeyPath="yes" Source="$(var.PDM_FOLDER)\PPDM.exe" >
      <!-- create desktop shortcut and icon -->
      <Shortcut Id="DesktopShortcut"
        Directory="DesktopFolder"
        Name="Predator PDM v11"
        Description="Predator Parts Data Management"
        WorkingDirectory="INSTALLFOLDER"
        Icon="PPDMICO.exe"
        IconIndex="0"
        Advertise="yes" >
      </Shortcut>
      <Shortcut Id="ApplicationStartMenuShortcut"
        Directory="ApplicationProgramsFolder"
        Name="Predator PDM v11"
        Description="Predator Parts Data Management"
        WorkingDirectory="INSTALLFOLDER"
        Icon="PPDMICO.exe"
        IconIndex="0"
        Advertise="yes" >
      </Shortcut>
   </File>
   <!-- Since this is where it's installed, lets remove it here also -->
   <!-- ppdm.exe is the controlling component for shortcuts and prog file folder -->
   <RemoveFolder Id="RemoveStartMenu" Directory="ApplicationProgramsFolder" On="uninstall"/>
</Component>

Originally posted by tima

@robmen
Copy link
Member

robmen commented Feb 12, 2017

Fixed

@robmen robmen closed this as completed Feb 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants