running wt should use the current working directory #4353

Open
opened 2026-01-30 23:44:56 +00:00 by claunia · 0 comments
Owner

Originally created by @stax76 on GitHub (Oct 9, 2019).

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?

SHELLEXECUTEINFO shExecInf

shExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
shExecInfo.fMask = NULL;
shExecInfo.hwnd = hwnd;
shExecInfo.lpVerb = verb.c_str();
shExecInfo.lpFile = path.c_str();
shExecInfo.lpParameters = args.c_str();
shExecInfo.lpDirectory = DirectoryExist(szDir) ? szDir : NULL;
shExecInfo.nShow = Items[i]->HideWindow ? SW_HIDE : SW_NORMAL;
shExecInfo.hInstApp = NULL;

Originally created by @stax76 on GitHub (Oct 9, 2019). 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? SHELLEXECUTEINFO shExecInf shExecInfo.cbSize = sizeof(SHELLEXECUTEINFO); shExecInfo.fMask = NULL; shExecInfo.hwnd = hwnd; shExecInfo.lpVerb = verb.c_str(); shExecInfo.lpFile = path.c_str(); shExecInfo.lpParameters = args.c_str(); **shExecInfo.lpDirectory = DirectoryExist(szDir) ? szDir : NULL;** shExecInfo.nShow = Items[i]->HideWindow ? SW_HIDE : SW_NORMAL; shExecInfo.hInstApp = NULL;
claunia added the Issue-FeatureResolution-Duplicate labels 2026-01-30 23:44:56 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#4353