|
@@ -9,6 +9,8 @@
|
|
|
#include <windows.h>
|
|
|
#include <shellapi.h>
|
|
|
#include <fstream>
|
|
|
+#include <algorithm>
|
|
|
+#include <cctype> // for std::tolower
|
|
|
#include <ShlObj.h>
|
|
|
|
|
|
using namespace std;
|
|
@@ -309,7 +311,10 @@ int checkActiveTxtAttr()
|
|
|
char vtmexePath[MAX_PATH] = {0};
|
|
|
GetModuleFileNameA(NULL, vtmexePath, sizeof(vtmexePath));
|
|
|
string strRunVtmPath = vtmexePath;
|
|
|
- const auto nPosVtm = strRunVtmPath.find("\\version\\VTM.exe");
|
|
|
+
|
|
|
+ string strCheck = vtmexePath;
|
|
|
+ std::transform(strCheck.begin(), strCheck.end(), strCheck.begin(), ::tolower);
|
|
|
+ const auto nPosVtm = strCheck.find("\\version\\vtm.exe");
|
|
|
if(nPosVtm == -1)
|
|
|
{
|
|
|
MessageBoxA(NULL,"[RTA0030] 可视柜台应用程序不在规定路径下执行,请重新安装程序版本!", ERROR_TITILE, MB_OK | MB_ICONERROR);
|