17 lines
367 B
C++
Raw Normal View History

2024-03-22 11:28:06 +08:00
#include <iostream>
#include <Windows.h>
int main()
{
char buffer[MAX_PATH + 1] = { 0 };
GetModuleFileNameA(NULL, buffer, MAX_PATH);
(strrchr(buffer, '\\'))[1] = 0;
std::string appPath = buffer;
sprintf_s(buffer, sizeof(buffer) / sizeof(wchar_t), "%s%s", appPath.c_str(), "run.bat");
system(buffer);
system("pause");
return 0;
}