views:

54

answers:

1

I have a program that when I build on release mode in visual studio it will copy the .exe file and all required file to a shared location for multiple users to access. Inside the folder that was copied i created automatically created a shortcut to the .exe file using C# when the project builds.

Problem

I want to be able to copy that folder off the shared location and put it on any desktop and run that shortcut file. The problem is that the shortcut is still pointing to the .exe file on the shared location and not the local one. How can I set the target location for the shorcut to be relative to where ever i place that local folder?

A: 

From what I know, you can't actually have relative shortcuts in Windows. May one ask why you need a shortcut? Why not just use the executable I mean? :)

You could always create a .bat-script to launch your app. Still, I don't know what you want to do so I'm just throwing ideas out there.

Edit: If a .bat won't do, you could always create a new app in the project which itself acts as a shortcut.

Robelirobban
They want really want that shortcut so they can leave the full directory in a location other than the desktop and just drag and drop the shortcut to the desktop.
MikeU
Is it difficult for them to right click the app and say "create shortcut", or Send to->Desktop (Create shortcut).
Mark H