C++shellexecute 路径切换后运行exe无反应

想用c++启动一个python的exe,但该exe依赖一个exe所在路径下的一个文件夹,
现用shellexecute并setcurrentdirectoryA切换路径后发现这个exe还是只能在绝对路径下运行,一旦切换到相对路径D:/ocrdll/,即exe_path(exe所在的文件夹路径)程序直接退出,请问原因是什么,路径不正确吗,应该如何正确设置

bool ocr::data_gen(LPCWSTR exe_path){//LPCSTR exe_path) {
    
    TCHAR chCurDir[MAX_PATH] = { 0 };
    GetCurrentDirectory(MAX_PATH, chCurDir);
    SetCurrentDirectoryA(exe_path);
    //check path;check file name
    DWORD dwAttributes = ::GetFileAttributesA(exe_path);
    //strcat(StrPath, "\\StorServer.exe");
    printf("current working directory: %s\n", _getcwd(NULL, NULL));
    if (INVALID_FILE_ATTRIBUTES == dwAttributes)
    {
        cout << "no file found" << "\n";
        return false;
    }
    
    ShellExecute(NULL, L"open", L"./data_gen_10.exe", NULL, NULL//此处改exe_path无效, SW_SHOW);
    //SetCurrentDirectory(chCurDir);
    return true;
}

void main(int argc, char** argv) {
    ocr read;
    read.train_exe("D:/ocr_dll");
    //read.data_gen("D:/ocr_dll");
    system("pause");
}

ShellExecute,第5个参数,指定工作路径,第2个参数改为文件名,不要"./",这样再试试

官网API说明写了,两个不能同时用相对路径

另外断点调试排查一下是不是其他原因导致崩溃,不一定是这个原因

建议用程序当前程序的绝对路径,然后用绝对路径启动比较稳定