mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-03-12 00:45:14 +00:00
Update winlibs.js
This commit is contained in:
parent
9db9f4d4eb
commit
8c307807ed
|
@ -1,7 +1,6 @@
|
|||
////////////////////////////////////////////////////////////////////////
|
||||
// Windows Library API
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
var SHELL = require("lib/shell");
|
||||
|
||||
exports.loadLibrary = function(LIB) {
|
||||
|
@ -15,9 +14,28 @@ exports.loadLibrary = function(LIB) {
|
|||
|
||||
commandOptions.push("rundll32.exe");
|
||||
commandOptions.push(LIB + ".dll," + FN);
|
||||
commandOptions.push(args.join(' '));
|
||||
commandOptions.push("\"" + args.join("\" \"") + "\"");
|
||||
|
||||
return SHELL.exec(commandOptions.join(' '));
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
exports.openControlPanel = function(name, args) {
|
||||
var shell32 = exports.loadLibrary("shell32");
|
||||
var _args = [];
|
||||
|
||||
_args.push(name + ".cpl");
|
||||
|
||||
if (typeof(args) !== "undefined") {
|
||||
for (var i in args) {
|
||||
_args.push(args[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return shell32.call("Control_runDLL", _args);
|
||||
};
|
||||
|
||||
exports.openNetworkControlPanel = function() {
|
||||
return exports.openControlPanel("ncpa");
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user