title: File Access from Excel COM object fails when run from NT Service on Vista
body: <p>We use COM objects to access excel spreadsheets in an NT service (via the Windows Scripting Host).  Prior to Vista, this worked beautifully, but starting with Vista, we receive this error:</p>
  
  <p>Microsoft Office Excel cannot access the file 'c:\myfiles\test.xls'. There are several possible reasons:</p>
  
  <ul>
  <li>The file name or path does not exist.</li>
  <li>The file is being used by another program.</li>
  <li>The workbook you are trying to save has the same name as a currently open workbook.</li>
  </ul>
  
  <p>I have tried changing the NT service logon settings to use my own account, an admin account and local system.  I've looked through the Local Security Policy and have not found anything.  I've spent days searching through the Microsoft KB to no avail.</p>
  
  <p>If the script is executed from a console application, it works fine.  The file opens and is processed with no problem.  The error only occurs when executed from within the context of a service.</p>
  
  <p>If the service is running on Windows XP or Server 2003 SP1, it also works fine.  Only on Vista does it fail (and we've now gotten reports of it failing in Server 2003 SP2)!</p>
  
  <p>The code, for what it is worth is exceptionally simple:</p>
  
  <pre><code>dim xl_app
  Set xl_app = CreateObject("Excel.Application")
  xl_app.Workbooks.Open mypath,0,1
  </code></pre>
  
  <p>I suspect that this person might be experiencing the same issue:
  <a href="http://bytes.com/forum/thread819740.html" rel="nofollow noreferrer"><a href="http://bytes.com/forum/thread819740.html" rel="nofollow noreferrer">http://bytes.com/forum/thread819740.html</a></a></p>