<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>奋斗博客 &#187; 本地提权</title>
	<atom:link href="http://www.fendou.info/tag/%e6%9c%ac%e5%9c%b0%e6%8f%90%e6%9d%83/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.fendou.info</link>
	<description>WordPress&#124;SEO&#124;Web&#124;Linux&#124;Windows&#124;Android</description>
	<lastBuildDate>Tue, 07 Feb 2012 12:04:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>vbs脚本实现普通用户以管理员权限运行程序</title>
		<link>http://www.fendou.info/vbs-run-software-as-administrator/</link>
		<comments>http://www.fendou.info/vbs-run-software-as-administrator/#comments</comments>
		<pubDate>Sun, 12 Jul 2009 13:59:44 +0000</pubDate>
		<dc:creator>dev</dc:creator>
				<category><![CDATA[操作系统]]></category>
		<category><![CDATA[vbs脚本]]></category>
		<category><![CDATA[本地提权]]></category>

		<guid isPermaLink="false">http://www.fendou.info/?p=318</guid>
		<description><![CDATA[vbs脚本实现普通用户以管理员权限运行程序 <a href="http://www.fendou.info/vbs-run-software-as-administrator/">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>众所周知在Windows帐号分好几个级别，User PowerUser Administrator。User在默认在情况下是不允许安装软件的，而好多公司给员工的电脑权限为User权限，当电脑软件需要升级或安装新的软件的时候很麻烦，必须切换到管理员帐号下才能安装，操作起来特别麻烦。当然你也可以在User帐号下选择运行方式以管理员身份来安装软件，但是这也需要人工输入管理员的用户名和密码，很浪费时间。其实用vbs脚本可以简化这些步骤，实现普通用户以管理员权限运行程序。<span id="more-318"></span></p>

<div class="wp_syntax"><div class="code"><pre class="vbscript" style="font-family:monospace;">set sh=WScript.CreateObject(&quot;WScript.Shell&quot;)   
WScript.Sleep   1000   
sh.Run  (&quot;runas   /user:administrator software.exe&quot; )  
WScript.Sleep   1000   
sh.SendKeys   &quot;password{ENTER}&quot;
WScript.Sleep   1000
sh.SendKeys   &quot;{ENTER}&quot;</pre></div></div>

<p>说明：将脚本与需要管理员权限执行的软件放在同一个目录下面。/user:计算机管理员 password是计算机管理员的密码。如果你的密码中包含特殊字符，那么需要查阅vbs模拟键盘输入的特殊字符的相关资料。总体来说脚本很简单，很实用，就是用脚本模拟了键盘输入用户名和密码的操作。如果你担心用户看到你的密码，可以用RAR程序将vbs脚本打包为exe自解压运行的程序并在执行后删除自身。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fendou.info/vbs-run-software-as-administrator/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

