1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-15 07:43:50 +00:00

1. Updated os.Name and os.name() to fetch Windows name from older versions of Windows

2. Fixed compiler warning
This commit is contained in:
Bryan Roe
2020-04-26 09:57:43 -07:00
parent de4c507b57
commit 19508fa79e
2 changed files with 8 additions and 3 deletions

View File

@@ -2204,7 +2204,10 @@ void ILibDuktape_ScriptContainer_OS_Push(duk_context *ctx, void *chain)
winstr = require('win-registry').QueryKey(require('win-registry').HKEY.LocalMachine, 'SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion', 'ProductName') + ' - ' +\
require('win-registry').QueryKey(require('win-registry').HKEY.LocalMachine, 'SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion', 'ReleaseID') + ' ' + winstr.substring(winstr.indexOf('['));\
}\
catch(xx) {}\
catch(xx)\
{\
winstr = require('win-registry').QueryKey(require('win-registry').HKEY.LocalMachine, 'SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion', 'ProductName') + ' ' + winstr.substring(winstr.indexOf('['));\
}\
}\
ret = winstr;\
break;\
@@ -2282,7 +2285,10 @@ void ILibDuktape_ScriptContainer_OS_Push(duk_context *ctx, void *chain)
winstr = require('win-registry').QueryKey(require('win-registry').HKEY.LocalMachine, 'SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion', 'ProductName') + ' - ' +\
require('win-registry').QueryKey(require('win-registry').HKEY.LocalMachine, 'SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion', 'ReleaseID') + ' ' + winstr.substring(winstr.indexOf('['));\
}\
catch(xx) {}\
catch(xx)\
{\
winstr = require('win-registry').QueryKey(require('win-registry').HKEY.LocalMachine, 'SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion', 'ProductName') + ' ' + winstr.substring(winstr.indexOf('['));\
}\
}\
this.promise._acc(winstr);\
break;\