title: Why won't AHK launch the Visual Studio Code app?
body: <p>This is how I can successfully open only the VS-Code app:</p>
  <pre><code>^!h::If !FileExist(code := StrReplace(A_AppData, &quot;Roaming&quot;, &quot;Local\Programs\Microsoft VS Code\Code.exe&quot;))
  MsgBox, 48, Error, File not found.\n`n%code%`
  Run, %code%
  return
  </code></pre>
  <p>However, here is my issue:</p>
  <p>I use Stardock Groupy on my computer. Groupy groups any open window on your computer into tabs; an Explorer window, application, etc. You can group specific folders and files and save them as a custom group, which Groupy will save as a &quot;.groupy&quot; file. The file runs by selecting it within the Groupy &quot;Saved Groups&quot; dropdown, or you can double-click the &quot;.groupy&quot; file.</p>
  <p>I have a custom &quot;.groupy&quot; file that opens (and groups into tabs) an Excel file and a text file that runs via VS-code. When I open my group, two things open successfully and get grouped into tabs: Excel and VS-Code.</p>
  <p>Three ways successfully open both Excel and VS-Code into a tabbed group:</p>
  <ol>
  <li>Within Groupy's dropdown</li>
  <li>Double-clicking the &quot;.groupy&quot; file</li>
  <li>Running the following command in cmd:
  %AppData%\Groupy\CROSS_EXCEL_VS.groupy</li>
  </ol>
  <p>I want to run this &quot;.groupy&quot; file via AHK, <strong>but when I do, the file runs, but only the Excel file opens. No matter how I try to run the .groupy file via AHK, VS-Code doesn't run at all.</strong></p>
  <p>Here are the various ways I've tried:</p>
  <p>001:</p>
  <pre><code>run, %A_AppData%\Groupy\CROSS_EXCEL_VS.groupy
  </code></pre>
  <p>002:</p>
  <pre><code>If !FileExist(groupy := A_AppData &quot;\Groupy\CROSS_EXCEL_VS.groupy&quot;)
  MsgBox, 48, Error, File not found.\n`n%groupy%`
  Run, %groupy%
  </code></pre>
  <p>003:</p>
  <pre><code>Run &quot;C:\Users\ztwer\AppData\Roaming\Groupy\CROSS_EXCEL_VS.groupy&quot;
  </code></pre>
  <p>004:</p>
  <pre><code>Run, C:\Program Files (x86)\Stardock\Groupy\Groupy32.exe
  , &quot;C:\Users\ztwer\AppData\Roaming\Groupy\CROSS_EXCEL_VS.groupy&quot;
  </code></pre>
  <p>005:</p>
  <pre><code>run cmd /k &quot;C:\Users\ztwer\AppData\Roaming\Groupy\CROSS_EXCEL_VS.groupy&quot;
  </code></pre>
  <p>006:</p>
  <pre><code>commands=&quot;C:\Users\ztwer\AppData\Roaming\Groupy\CROSS_EXCEL_VS.groupy&quot;
  runwait, %comspec% /c %commands%
  </code></pre>
  <p>007:</p>
  <pre><code>run C:\Windows\System32\cmd.exe /C &quot;C:\Users\ztwer\AppData\Roaming\Groupy\CROSS_EXCEL_VS.groupy&quot;,,hide
  </code></pre>
  <p>What can the problem be?</p>