title: Why does this path string make the .hta not find the program?
body: <p>. I want to make an .hta program to have a button, which when pressed opens any program I can find a path to. For instance, the original syntax used in the following code lead to notepad being run (the path <strong>did not have</strong> any spaces in it, was in system32), HOWEVER - no other program I try this for (changing the path, which would and should just be a 2 second deal - I'm trying excel in Program Files) works. The .hta does not find the program no matter what I do. I've heard the spaces are %20 in code (tried adding - nothing), I've tried the triple quotes - nothing.
  Please help me understand how the path of the program in the .hta should be written, so I could substitute it for other programs.</p>
  <p>I've been reading up on this (.htas) for weeks, some things are easier to understand than others, but this one is just an insult, because this should not be one of the top questions I find people asking online (oh the countless posts I've read with half-a55ed responses for a solution; all which I've tried - none worked).</p>
  <pre><code>function RunFile(path){
      WshShell = new ActiveXObject(&quot;WScript.Shell&quot;);
      WshShell.Run(path, 1, false);}
  &lt;/script&gt;
  &lt;body&gt;
  &lt;input type=&quot;button&quot; value=&quot;Run Excel&quot;  
      onclick=&quot;RunFile('C:\Program Files (x86)\Microsoft Office\Office14\excel.exe');&quot;
  </code></pre>
  <p>Please help me understand the .hta program</p>