<p dir="auto">When you start cmd or powershell with ShellExecuteEx or CreateProcess then you can define a working directory, cmd or powershell will start with that working directory but not wt. Is this unsupported or is there a setting?</p>
<p dir="auto">SHELLEXECUTEINFO shExecInf</p>
<p dir="auto">shExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);<br>
shExecInfo.fMask = NULL;<br>
shExecInfo.hwnd = hwnd;<br>
shExecInfo.lpVerb = verb.c_str();<br>
shExecInfo.lpFile = path.c_str();<br>
shExecInfo.lpParameters = args.c_str();<br>
<strong>shExecInfo.lpDirectory = DirectoryExist(szDir) ? szDir : NULL;</strong><br>
shExecInfo.nShow = Items[i]-&gt;HideWindow ? SW_HIDE : SW_NORMAL;<br>
shExecInfo.hInstApp = NULL;</p>
<h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: Microsoft Windows [Version 10.0.18990.1]
Windows Terminal version:  0.5.2622.0"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: Microsoft Windows [Version 10.0.18990.1]
Windows Terminal version:  0.5.2622.0
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<p dir="auto">Windows Terminal doesn't find PowerShell Core unless it was installed via a standard MSI.</p>
<p dir="auto">However, folks can also install PowerShell via  .NET Core global tool (which is makes its detection and location different) <a href="https://devblogs.microsoft.com/powershell/introducing-powershell-as-net-global-tool/" rel="nofollow">https://devblogs.microsoft.com/powershell/introducing-powershell-as-net-global-tool/</a></p>
<p dir="auto">Or you can install PowerShell Core via an MSIX installer (not an MSI) <a href="https://github.com/PowerShell/PowerShell/releases">https://github.com/PowerShell/PowerShell/releases</a></p>
<p dir="auto">I would propose that we detect all three of these PowerShell Core possible installation vehicles and make profiles for them. Example: PowerShell Core (MSIX), PowerShell Core (Global Tool), etc.</p>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">PowerShell Core is totally ignored when installed in these alternate, but supported, ways.</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">Nada.</p>