Groups | Blog | Home
all groups > dotnet setup > november 2003 >

dotnet setup : Setup project's SendTo shortcut not working



Jerry Houston
11/21/2003 2:54:37 PM
I built a little utility that accepts file paths on the command line, and I
wanted to install it such that a user could select some files in Explorer,
then SendTo the utility. If I manually create a shortcut in my Documents
and Settings\<username>\SendTo folder, it works like a charm. But others
are going to be using this as well, and I wanted to automate creating that
shortcut as part of the setup project.

I've had no problem creating the shortcut there, but a shortcut that is
created elsewhere and copied to the SendTo folder won't show up in the
Explorer context menu as a SendTo destination. Shortcuts created there by
Explorer work just fine. Shortcuts created elsewhere (including by the
setup project) are 2K in size on my XP machine, while shortcuts originally
created in that folder are only 1K in size. So there's definitely a
difference besides the works/doesn't difference.

Is there something I need to do to modify the shortcut created by the
install project so that XP will recognize it and include the application in
its SendTo list? Thanks in advance for any help!

Phil Wilson
11/25/2003 10:20:39 AM
It might be easier to just add the DISABLEADVTSHORTCUTS property with a value of
1 in the Property table.
--
Phil Wilson [MVP Windows Installer]
----
[quoted text, click to view]
program when you add the [ ] around it it tells it that it is not an advertised
shortcut.
[quoted text, click to view]

Jerry Houston
11/25/2003 3:01:16 PM
Thanks to both you and Phil for your help. There's no way in the world I
could have figured this out.

It's actually the user account's SendTo folder where the shortcut needs to
be created. Is that what [TARGETFOLDER]\<name of my app> will expand to?

Since the setup editor provides the user's SendTo folder as a destination,
and will create a shortcut there, is there any chance that a future VS
version might be able to do this by itself, and create viable shortcuts in
that destination? Is that already on the wish list?

[quoted text, click to view]
that happen to not work when used in the send to folder....

tderksen NO[at]SPAM online.microsoft.com
11/25/2003 5:03:22 PM
Jerry, this can be done however it does require some tinkering with your MSI file.
What is happening here is that setup projects create advertised shortcuts that happen to not work when used in the send to folder.
To create a regular shortcut in your deployment project you will need to use the ORCA tool.
It comes with the Windows installer SDK available here http://www.microsoft.com/msdownload/platformsdk/sdkupdate/
The documentation is also available there.
What you have to do is open the MSI with Orca and go to the shortcut table.
In the shortcut table you will find an entry for every shortcut your project creates, find your shortcut in the table.
You now want to change the Target from "DEFAULTFEATURE" to probably "[TARGETFOLDER]\<name of your app>"
You then want to remove any text under the Icon_ row.
The Target row contains information about how the shortcut accesses the program when you add the [ ] around it it tells it that it is not an advertised shortcut.
[TARGETFOLDER] is a macro that expands into the installed folder for the app.
The Icon_ column is necessary for advertised shortcuts and needs to be removed.

I hope that helps.
------
Todd Derksen - VBQA Deployment Testing
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------

--------------------
| From: "Jerry Houston" <JHouston@AMSWorld.com>
| Subject: Setup project's SendTo shortcut not working
|
| I built a little utility that accepts file paths on the command line, and I
| wanted to install it such that a user could select some files in Explorer,
| then SendTo the utility. If I manually create a shortcut in my Documents
| and Settings\<username>\SendTo folder, it works like a charm. But others
| are going to be using this as well, and I wanted to automate creating that
| shortcut as part of the setup project.
|
| I've had no problem creating the shortcut there, but a shortcut that is
| created elsewhere and copied to the SendTo folder won't show up in the
| Explorer context menu as a SendTo destination. Shortcuts created there by
| Explorer work just fine. Shortcuts created elsewhere (including by the
| setup project) are 2K in size on my XP machine, while shortcuts originally
| created in that folder are only 1K in size. So there's definitely a
| difference besides the works/doesn't difference.
|
| Is there something I need to do to modify the shortcut created by the
| install project so that XP will recognize it and include the application in
| its SendTo list? Thanks in advance for any help!
|
|
|


tderksen NO[at]SPAM online.microsoft.com
11/26/2003 12:20:22 AM
Hopefully this will clear up the issue about Where a shortcut lives and what it points at.
Where the shortcut lives is determined by the Directory_ Entry in the database which should be = SendToFolder.
The Target is what the shortcut points at.
[TARGETFOLDER] will expand to the install directory of the setup project, if this is not where your application is installing to, we will have to figure out
another way to point at it.

If you do not have other shortcuts in your program that would benifit from the advertise feature Phil suggestion sounds good.

We are aware of this issue and it is on a wish list, however it is a very long wish list and I do not think it will be changed for the next version, sorry.

------
Todd Derksen - VBQA Deployment Testing
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
|
| Thanks to both you and Phil for your help. There's no way in the world I
| could have figured this out.
|
| It's actually the user account's SendTo folder where the shortcut needs to
| be created. Is that what [TARGETFOLDER]\<name of my app> will expand to?
|
| Since the setup editor provides the user's SendTo folder as a destination,
| and will create a shortcut there, is there any chance that a future VS
| version might be able to do this by itself, and create viable shortcuts in
| that destination? Is that already on the wish list?
|
[quoted text, click to view]
| > Jerry, this can be done however it does require some tinkering with your
| MSI file.
| > What is happening here is that setup projects create advertised shortcuts
| that happen to not work when used in the send to folder....
|
|
|


Jerry Houston
11/26/2003 9:42:53 AM
Thanks for the additional information. I think that probably would have
enabled me to do it the way you suggested.

I'm mostly a winform/webservice developer, and haven't worked much with the
installer technology. I'm unaware of how "advertised" and "unadvertised"
shortcuts differ, but I took Phil's suggestion, and it worked a charm. I do
install another shortcut, on the user's desktop, and that looks and works
just as I expect it to (even though it is now "unadvertised").

Thanks again to both of you for your help. My utility installation now
creates a proper shortcut that makes SendTo possible without any fuss on the
part of the person installing it.

[quoted text, click to view]
if this is not where your application is installing to, we will have to
figure out
[quoted text, click to view]
the advertise feature Phil suggestion sounds good.

aryxmyth NO[at]SPAM gmail.com
1/19/2005 9:44:32 AM
I found that using "[TARGETDIR]\<name of your primary output exe>"
worked correctly.

I posted my solution at
http://www.smithism.com/tech-journal/2005/1/19/deploying-an-apps-shortcut-in-the-users-send-to-menu.html
giving credit to Todd.

Thanks
AddThis Social Bookmark Button