gnh1201 / welsonjs

WelsonJS - Build a Windows app on the Windows built-in JavaScript engine

Home Page:https://catswords.social/@catswords_oss

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[lib/shell] Run as administrator

gnh1201 opened this issue · comments

[lib/shell] Run as administrator

lib/shell.js

exports.elevatedRun = function(FN, args) {
    var oShell = CreateObject("Shell.Application");
    oShell.shellExecute(FN, args, null, "runas", 0);
    return oShell;
};