title: How do I terminate WINWORD.EXE when used by classic ASP?
body: <p>I have a user who <em>has</em> to use Microsoft Word 2007 to create and manipulate word documents in his ASP web application. I'm well aware of the '<a href="http://support.microsoft.com/default.aspx?scid=KB;en-us;q257757" rel="nofollow noreferrer">Considerations for server-side Automation of Office</a>' KB article and the many third party components available to do this kind of thing, but they've gone a fair bit down this road already.</p>
  
  <p>The problem he's having is that the <code>WINWORD.EXE</code> process never terminates even though he calls <code>Quit</code> on the application object.</p>
  
  <p>For example:</p>
  
  <pre><code>Set objWord = Server.CreateObject("Word.Application")
  '' Do work
  objWord.Quit
  Set objWord = Nothing
  </code></pre>
  
  <p>As you would expect, his server ends up littered with orphaned <code>WINWORD.EXE</code>
  processes requiring manual intervention to terminate.</p>
  
  <p>Is there a way to terminate these <code>WINWORD.EXE</code> processes explicitly in the script?</p>
  
  <p><strong>Update:</strong></p>
  
  <p>I've made some progress with this and I think I have a handle on what the problem is. When an Office application runs for the first time under a new Windows account it asks for your name and initials. Now because there is no visible GUI, there is no-one there to push all the right buttons. I've tried starting <code>WINWORD.EXE</code> as the website anonymous account identity using <code>RUNAS</code>, but there's some permission issue that's preventing Word or Office performing some other kind of initial setup routine it wants to do.</p>