title: Is it possible to configure app to start on Windows startup without requiring Admin privileges?
body: <p>I have a <code>WPF</code> application and I want to offer a checkbox that configures if the app will start on Windows startup (or not).</p>
  
  <p>For now, I have it working with this:</p>
  
  <pre><code>void ManageRunOnStartup(bool runOnStartup)
  {
      var shortcutPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Startup), "myApp.lnk");
      var shortcutExists = System.IO.File.Exists(shortcutPath);
  
      if (runOnStartup)
      {
          if (shortcutExists == false)
              CreateShortcut(shortcutPath);
      }
      else if (shortcutExists)
      {
          System.IO.File.Delete(shortcutPath);
      }
  }
  
  void CreateShortcut(string shortcutPath)
  {
      var appLocation = System.Reflection.Assembly.GetExecutingAssembly().Location;
  
      var shell = new WshShell();
      var shortcut = shell.CreateShortcut(shortcutPath) as IWshShortcut;
      shortcut.TargetPath = appLocation;
      shortcut.WorkingDirectory = Path.GetDirectoryName(appLocation);
      shortcut.Save();
  }
  </code></pre>
  
  <p>The thing is, to write/delete a file in the <code>Environment.SpecialFolder.Startup</code> folder, the app requires Admin rights :(</p>
  
  <p>Is there a way to achieve the same result but without requiring Admin rights?</p>