title: C#.NET console app (.exe) versus VBScript (.vbs) for Scheduled Tasks
body: <p>I have the following VBScript:</p>
  
  <pre><code>Dim strFile, strXPath, strNewText, xmlDoc, xmlNodes, xmlNode
  
  strFile = "C:\folder\cats.xml"
  strXPath = "/list/cat/@LAST_BATH"
  strNewText = Now
  
  Set xmlDoc =  CreateObject("Microsoft.XMLDOM")
  
  xmlDoc.Async = "False"
  xmlDoc.Load(strFile)
  
  Set xmlNodes = xmlDoc.selectNodes(strXPath)
  
  For Each xmlNode in xmlNodes
    xmlNode.Text = strNewText
  Next
  
  xmlDoc.Save strFile
  </code></pre>
  
  <p>XML file:</p>
  
  <pre><code>&lt;?xml version="1.0" ?&gt;
  &lt;list&gt;
    &lt;cat NAME="Monkey" LAST_BATH="9/30/2010  3:02:02 PM" /&gt;
  &lt;/list&gt;
  </code></pre>
  
  <p>The above script is only 1KB.  I also have a small C#.NET console app (.exe) that does exactly the same thing, but it is 11KB, and the App.config is 1KB (config file so the path and field name is not hard-coded).</p>
  
  <p>What I intend to do is create a Scheduled Task to run the above process at some interval.</p>
  
  <p><strong>Which is better to use, the .vbs or the .exe?  And why?</strong></p>
  
  <p>Does the difference in memory affect performance?  I assume the .exe is faster because it is pre-compiled, but since the .vbs is so small, I'm guessing it's about as fast as you could ever want anyway.</p>
  
  <p><em>(I realize this is a moot point, but I'm just curious.  Thanks for you patience.)</em></p>