title: changing URL file of Internet Explorer .url files
body: <p>I am trying to change .url file generated by IE as a favorite file. I have the following code in C#:</p>
  
  <pre><code>string[] lines = File.ReadAllLines(filename);
  lines[1] = "URL=javascript:{alert('this is a test');void(0);}";
  File.WriteAllLines(filename, lines);
  </code></pre>
  
  <p>The .url file opened in Notepad looks like this (the code is of a bookmarklet that will change over and over):</p>
  
  <pre><code>[InternetShortcut]
  URL=javascript:{alert('this is a test');void(0);}
  </code></pre>
  
  <p>The problem is IE does not see get the changes until it is closed and re-opened. How do I make it, reload the new URL?</p>