title: Use a variable in file path in .vbs
body: <p>Is it possible to usa variable in a path in .vbs. My basic situation is I have a vbs script that will often be run on a computer with one person logged in and run by an admin with a completely different user name (assume the file will be right clicked and "Run As"). </p>
  
  <p>The script edits an ini file that is located in the user directory for the person logged in. I know in batch I could simply insert the variable <code>"C:\Users\%Logger%\AppData\Local\stat.ini"</code> and the variable would be replaced. But I can't do this in .vbs. My script thus far. Or look at the bulk of it in an answer <a href="https://stackoverflow.com/questions/7423316/search-and-edit-a-file-with-a-batch-file">here</a>. </p>
  
  <pre><code>Dim blnRes: blnRes = 0
  Dim strOld, strNew, logger
  strOld = "frogg"
  strNew = "frog"
  logger = Inputbox("What is your Domain ID exactly as entered when you log into this machine?","Domain ID")
  
  On Error Resume Next
  Call update("C:\Users\logger\AppData\Local\stat.ini", strOld, strNew)
  blnRes = blnRes Or (Err.Number = 0): Err.Clear
  </code></pre>
  
  <p>Is there some way I can flag <code>logger</code> as a variable, or is there an easier way to do this?</p>