码迷,mamicode.com
首页 > Windows程序 > 详细

windows设置笔记

时间:2015-08-26 08:14:50      阅读:174      评论:0      收藏:0      [点我收藏+]

标签:

1. 使用Sudo提升权限

http://www.alexblair.org/user-alexblair-post-1046.html

新建 sudo.js 放到 C:\windows\下面,内容如下:

var command = WScript.Arguments.Item(0);
var argument = "";
for (var i = 0; i < WScript.Arguments.Count(); ++i) {
    argument += WScript.Arguments.Item(i) + " ";
}
try {
    var shellapp = new ActiveXObject("Shell.Application");
    shellapp.ShellExecute(command, argument, null, "runas", 1);
} catch(e) {
    WScript.Echo("Something wrong: " + e.description + " By http://www.alexblair.org");
}

 

windows设置笔记

标签:

原文地址:http://www.cnblogs.com/newsea/p/4759194.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!