title: Getting current directory in VBScript
body: <p>I'm trying to get the current directory and use it to run an application no matter where the file is put and no matter how the path is changed</p>
  
  <pre><code>Dim fso: set fso = CreateObject("Scripting.FileSystemObject")
  Dim CurrentDirectory
  CurrentDirectory = fso.GetAbsolutePathName(".")
  Dim Directory
  Directory = CurrentDirectory\attribute.exe
  
  Set WinScriptHost = CreateObject("WScript.Shell")
  WinScriptHost.Run Chr(34) &amp; "Directory" &amp; Chr(34), 0
  Set WinScriptHost = Nothing
  </code></pre>
  
  <p>How do I actually set up this code so it does what I want it to do correctly?</p>