title: .GetAbsolutePathName(".") in vbscript does not get correct path when run by task scheduler
body: <p>I am trying to run a vb script using task scheduler.
  I am using the .GetAbsolutePathName(".") to get the full path of the script. 
  When I run the script manually, it was able to get the correct path. But when run as scheduled task, it outputs "C:\Windows\System32\ as the path.</p>
  
  <p>I am using the path name to get the full path of an Excel file that I would like to run. The excel file is saved within the same path as the script.</p>
  
  <p>Below is my code:</p>
  
  <pre><code>Set fso = CreateObject("Scripting.FileSystemObject")
  
  scurDir = fso.GetAbsolutePathName(".")
  
  set fso = nothing
  
  Set myxlApplication = CreateObject("Excel.Application")
  
  wscript.echo scurDir &amp; "\OOO Automation Tool.xlsm"
  
  Set myWorkBook = myxlApplication.Workbooks.Open( scurDir &amp; "\OOO Automation Tool.xlsm" )
  
  myxlApplication.Visible = False
  
  myxlApplication.Wait(Now + TimeValue("0:00:10"))
  
  'Run routine
  myWorkBook.Application.Run "MOutofOffice.pDetectIdleTime" 
  
  'Close application
  myxlApplication.Quit
  
  'Release objects
  set myxlApplication = nothing
  set myWorkBook = nothing
  </code></pre>
  
  <p>Can you help me get the correct path?</p>