|
|
@@ -79,6 +79,32 @@ public:
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ static bool IsAutoStart()
|
|
|
+ {
|
|
|
+ HKEY hKey;
|
|
|
+ wstring strRegPath = L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run";
|
|
|
+
|
|
|
+ //1、找到系统的启动项
|
|
|
+ if (RegOpenKeyEx(HKEY_CURRENT_USER, strRegPath.c_str(), 0, KEY_ALL_ACCESS, &hKey) == ERROR_SUCCESS)
|
|
|
+ {
|
|
|
+ char dwValue[256];
|
|
|
+ DWORD dwSzType = REG_SZ;
|
|
|
+ DWORD dwSize = sizeof(dwValue);
|
|
|
+
|
|
|
+ if (::RegQueryValueEx(hKey, _T("智铺子收银软件"), 0, &dwSzType, (LPBYTE)&dwValue, &dwSize) != ERROR_SUCCESS)
|
|
|
+ {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ //关闭注册表
|
|
|
+ RegCloseKey(hKey);
|
|
|
+
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
// 判断文件是否存在
|
|
|
static BOOL IsFileExist(const wstring& csFile)
|
|
|
{
|