title: Execution context of a .lnk created on desktop
body: <p>I've an application A that create a shortcut on Desktop linked to another application B. Application B on start have to check if some files need to be updated and download it to B application folder but if I open it from the shortcut on  desktop, Application B download all the updated files on the desktop. I've searched for answer if there's a way to tell the created link just to don't change the execution context.</p>
  
  <p>The code that create .lnk on desktop is the following:</p>
  
  <pre><code>Type t = Type.GetTypeFromCLSID(new Guid("72C24DD5-D70A-438B-8A42-98424B88AFB8")); //Windows Script Host Shell Object
          dynamic shell = Activator.CreateInstance(t);
          try
          {
              var lnk = shell.CreateShortcut(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory)+"/"+string.Format("{0}.lnk", Name));
              try
              {
                  lnk.TargetPath = Path;
                  lnk.IconLocation = Path+", 0";
                  lnk.Save();
              }
              finally
              {
                  Marshal.FinalReleaseComObject(lnk);
              }
          }
          finally
          {
              Marshal.FinalReleaseComObject(shell);
          }
  </code></pre>