views:

1817

answers:

1

I've been tasked with creating some shortcuts to the desktop when our app installs. Most of these shortcuts belong to our own app and its deployed files but a couple belong to other executables that already exist on the target system (such as Sharepoint Central Admin).

For the shortcuts I need to deply for our own app I think an unadvertised shortcut is the way to go? I have the following code for one of my shortcuts..

<Directory Id="DesktopFolder" Name="Desktop" />
<Shortcut Id="DesktopShortcut" Directory="DesktopFolder" Advertise="yes" Name="Solution Manager" Icon="SolutionManager.exe">
      <Icon Id="IntuitionSolutionManager.exe" SourceFile="$(var.SolutionManagerRootFolder)SolutionManager.exe" />
</Shortcut>

I am confused however about creating shortcuts to apps that already exist on the system. In particular I want to create a shortcut to the Sharepoint Central Admin and place it on the desktop. The existing Sharepoint Central Admin shortcut in start menu has the following target...

"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\psconfigui.exe" -cmd showcentraladmin

How do I go about creating a shortcut for this on the desktop? Also how do I pass it the arguments (-cmd showcentraladmin).

+3  A: 

The Shortcut/@Target attribute is formatted. That means you can provide a path in via a Property using the "[PROPERTY_ID]" syntax. A FileSearch element could be used to find the executable you want to point at and assign it to a Property.

The command-line arguments an be provided via the Shortcut/@AQrgumetns attribute.

Rob Mensching