title: How can I redirect all shortcuts to a given executable? Is there any equivalent to a symlink on Windows?
body: <p>I am working on a program which includes a general purpose engine, some program specific content, and a custom automatic updater to handle updating the many gigabytes worth of media in our content as efficiently as possible. In a recent release of the engine, we have reorganized our directory structure, such that instead of the executable installing to (for example) <code>c:\Program Files\Program\Engine.exe</code>, it is now in <code>c:\Program Files\Program\engine\win32\NewEngine.exe</code> (note that the name of the engine changed as well in this process).</p>
  
  <p>The problem is that in order to launch the program, the user needs to use a shortcut, which we install in their start menu and (optionally) on their desktop. The move of the engine after an update breaks those shortcuts, though. So now I need to figure out a way to fix all of the shortcuts that the user has in order to launch the program.</p>
  
  <p>Coming from a Unix/Mac OS X background, my inclination would be to just create a symlink from the old executable name to the new one. As far as I know though, there isn't really an equivalent of a symlink on Windows (from Googling, I see that there are <a href="http://en.wikipedia.org/wiki/NTFS_symbolic_link" rel="nofollow noreferrer">symlinks on Vista and later</a>, but this needs to work on XP). Am I wrong in my assumption? <strong>Is there any equivalent on Windows to a symlink to an executable?</strong></p>
  
  <p>Some other possible solutions that come to mind are:</p>
  
  <ol>
  <li>Creating a small executable at the old location that launches the real one in the new location. <strong>Is there any quick and easy way to create a simple, headless executable, that just launches another program?</strong> Again, on Unix, I'd simply create a shell script, but as far as I know I can't name a <code>.bat</code> file <code>.exe</code> and have it run, so this needs to be a way to actually generate an <code>.exe</code>.</li>
  <li>Upon the update, search for all shortcuts that point to the executable and edit them. <strong>Is there any (efficient and reliable) way to find all shortcuts on the system that point to a given location and update them?</strong></li>
  <li>A combination of the above, with a small executable that detects that it's being launched from a shortcut, and edits that shortcut before launching the real program. <strong>Is there any way to detect that a program is being launched from a shortcut, and thus be able to edit that shortcut?</strong></li>
  </ol>
  
  <p>Would any of these options work, and if so how? What is the best way to do this sort of thing on Windows? <strong>Am I missing any other ways of redirecting a shortcut from one location to another?</strong></p>
  
  <p><strong>edit to add</strong>: Some additional requirements we have:</p>
  
  <ol>
  <li>Many of our users are non-technical. Any solution requiring user intervention is out of the question.</li>
  <li>This should be as seamless as possible. Having any extra windows pop up every time the user clicks the shortcut is unacceptable.</li>
  <li>This should be robust in the face of most things the user could have done, such as rearranging their start menu or moving a shortcut to the quick launch bar.</li>
  <li>Our shortcuts are absolutely necessary to the functioning of the program, as they pass in arguments necessary for the engine to load the content (yes, this is less than ideal; I would prefer to fix this, but cannot at this point)</li>
  <li>I'm looking for something that is relatively quick and easy to implement and extremely reliable.</li>
  </ol>