Код: Выделить всё
"C:\Program Files\Git\git-bash.exe" "--cd=C:\Users\Username\Desktop\folder"
Но если я попытаюсь выполнить ту же команду с помощью ShellExecute(), git-bash.exe не откроется, но ShellExecute() вернет статус успеха (статус > 32).
Мой код на C++:
Код: Выделить всё
#include
#include
#include
void ShlExec(const wchar_t* pCmd)
{
std::wstring cmd = L"/c " + std::wstring(pCmd);
std::cout 32); // true
}
int main()
{
ShlExec(L"\"C:\\Program Files\\Git\\git-bash.exe\" \"--cd=C:\\Users\\Username\\Desktop\\folder\"");
}
Подробнее здесь: https://stackoverflow.com/questions/793 ... d-properly
Мобильная версия