|
@@ -83,24 +83,32 @@ export function nodeCheckRemoteDesktop() {
|
|
|
action: "nodeCheckRemoteDesktop",
|
|
|
});
|
|
|
|
|
|
- const appList = window
|
|
|
- .nodeRequire("child_process")
|
|
|
- .execSync("cmd /c chcp 65001>nul && tasklist /FO CSV")
|
|
|
- .toString();
|
|
|
- // console.debug(appList);
|
|
|
- if (!appList) return false;
|
|
|
+ try {
|
|
|
+ const appList = window
|
|
|
+ .nodeRequire("child_process")
|
|
|
+ .execSync("cmd /c chcp 65001>nul && tasklist /FO CSV")
|
|
|
+ .toString();
|
|
|
+ // console.debug(appList);
|
|
|
+
|
|
|
+ if (!appList) return {};
|
|
|
|
|
|
- if (
|
|
|
- (appList.match(/sunloginclient/gi) &&
|
|
|
- appList.match(/sunloginclient/gi).length > 0) ||
|
|
|
- (appList.match(/向日葵/gi) && appList.match(/向日葵/gi).length > 0) ||
|
|
|
- (appList.match(/选择免安装运行,截图识别/gi) &&
|
|
|
- appList.match(/选择免安装运行,截图识别/gi).length > 0)
|
|
|
- ) {
|
|
|
- return true;
|
|
|
- } else {
|
|
|
- return false;
|
|
|
+ if (
|
|
|
+ (appList.match(/sunloginclient/gi) &&
|
|
|
+ appList.match(/sunloginclient/gi).length > 0) ||
|
|
|
+ (appList.match(/向日葵/gi) && appList.match(/向日葵/gi).length > 0) ||
|
|
|
+ (appList.match(/选择免安装运行,截图识别/gi) &&
|
|
|
+ appList.match(/选择免安装运行,截图识别/gi).length > 0)
|
|
|
+ ) {
|
|
|
+ return { hasSun: true };
|
|
|
+ }
|
|
|
+
|
|
|
+ if (appList.match(/todesk/gi) && appList.match(/todesk/gi).length > 0) {
|
|
|
+ return { hasTodesk: true };
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ console.log(error);
|
|
|
}
|
|
|
+ return {};
|
|
|
}
|
|
|
|
|
|
let previousAppList = [];
|