17 lines
369 B
C++
17 lines
369 B
C++
#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;
|
|
}
|