title: Having trouble with a vbscript creating a new vbscript containing a variable from the original
body: <p>I am trying to make a vbs that creates a new vbs file, but im having some trouble with the creation of the second file.</p>
  
  <p>Earlier in the first script it asks for your desired username, which is then assigned to a variable named user.</p>
  
  <p>When it creates the second script, i want the user name to display in a message saying Welcome back [insert username here]. Please input a program value.</p>
  
  <p>problem is, i cant get it to place your username inside of the new scripts code.</p>
  
  <p>attempt 1</p>
  
  <pre><code>If VTCreate1 = 6 And VTCreate2 = 7 And VTCreate3 = 7 And VTCreate4 = 7 And VTCreate5 = 7 Then
  Set objFile = objFS.CreateTextFile("C:\Users\Public\Desktop\Aeshnidae_1627374757.vbs")
  objFile.WriteLine("vtcmd=inputbox(""Welcome back "")" &amp; user &amp; "("". Please input a program value."")")
  </code></pre>
  
  <p>attempt 1 results in the newly created script containing the following</p>
  
  <pre><code>vtcmd=inputbox("Welcome back ")Human(". Please input a program value.")
  </code></pre>
  
  <p>attempt 2</p>
  
  <pre><code>If VTCreate1 = 6 And VTCreate2 = 7 And VTCreate3 = 7 And VTCreate4 = 7 And VTCreate5 = 7 Then
  Set objFile = objFS.CreateTextFile("C:\Users\Public\Desktop\Aeshnidae_1627374757.vbs")
  objFile.WriteLine("vtcmd=inputbox(""Welcome back &amp; user &amp; . Please input a program value."")")
  </code></pre>
  
  <p>attempt 2 results in the following</p>
  
  <pre><code>vtcmd=inputbox("Welcome back &amp; user &amp; . Please input a program value.")
  </code></pre>
  
  <p>any idea how to get the desired username properly inside of the message?</p>