![uac管理员程序](https://i-blog.csdnimg.cn/blog_migrate/c39d6aa3689aebaaf5609984eb5c0cac.png)
uac管理员程序
![Windows 10 hero image](https://i-blog.csdnimg.cn/blog_migrate/9ad450ba765063be8e73688581fb3238.png)
User Access Control (UAC) prompts in Windows 10 can be annoying, especially when you often run a program that requires Administrator permissions. Thankfully, there’s a way to create a shortcut that doesn’t prompt you for UAC.
Windows 10中的用户访问控制(UAC)提示可能很烦人,尤其是当您经常运行需要管理员权限的程序时。 幸运的是,有一种方法可以创建不会提示您输入UAC的快捷方式。
This trick works by setting up a scheduled task to run the target application in Administrator mode for you. You can then create a desktop shortcut that tells the task to run, which will bypass the UAC prompt the next time you click the shortcut.
此技巧通过设置计划任务以在管理员模式下为您运行目标应用程序而起作用。 然后,您可以创建一个告诉任务运行的桌面快捷方式,下次您单击该快捷方式时,它将绕过UAC提示。
While you can technically disable UAC prompts altogether, that’s an inherently bad idea as it opens up your computer’s security to potential threats and malicious code.
从技术上来说,您可以完全禁用UAC提示,但这是一个固有的坏主意,因为它使计算机的安全性不受潜在威胁和恶意代码的影响。
Because running Task Scheduler requires you to click through a UAC prompt that gives Administrator privileges to set up a task, this trick isn’t really a security loophole.
因为运行Task Scheduler需要您单击UAC提示符,该提示符为管理员提供了设置任务的特权,所以该技巧实际上并不是安全漏洞。
如何创建计划任务 (How to Create a Scheduled Task)
To launch the Task Scheduler, click Start, type Task Scheduler
into the search bar, and then select the Task Scheduler icon in the search results.
要启动任务计划程序,请单击“开始”,在搜索栏中键入“ Task Scheduler
”,然后在搜索结果中选择“任务计划程序”图标。
![Run Task Scheduler.](https://i-blog.csdnimg.cn/blog_migrate/78ed07de01fe67a91597752f359ebd7f.png)
When Task Scheduler opens, click on “Create Task” from the pane on the right side of the window.
当“任务计划程序”打开时,从窗口右侧的窗格中单击“创建任务”。
![Click "Create task" to create a new task.](https://i-blog.csdnimg.cn/blog_migrate/842ef082eaea3baa2221389d62e810ef.png)
Give the task a simple name—preferably without any spaces—that’s easy to remember and then tick the box next to “Run with Highest Privileges.” You can even give it a brief description if you want, but it isn’t necessary.
给任务起一个简单的名字-最好不要有空格-这样容易记住,然后在“以最高特权运行”旁边的框内打钩。 如果需要,您甚至可以对其进行简短描述,但这不是必需的。
![Give it a memorable name and tick the box next to "Run with highest privileges."](https://i-blog.csdnimg.cn/blog_migrate/d5d66cb932571a262046b9df5cb61e06.png)
By default, if you’re setting up this task on a laptop, Task Scheduler won’t run the task unless your computer is connected to AC power. If you don’t disable this option, when you click on the shortcut, the task won’t initiate the program and stick in a “Queued” state until you plug in the AC power.
默认情况下,如果您要在笔记本电脑上设置此任务,除非您的计算机连接到交流电源,否则“任务计划程序”将不会运行该任务。 如果不禁用此选项,则在单击快捷方式时,该任务将不会启动程序,并且在插入交流电源之前不会停留在“排队”状态。
Click the “Conditions” tab and untick the box next to “Start the Task Only If the Computer Is on AC Power.”
单击“条件”选项卡,然后取消选中“仅当计算机使用交流电源时才启动任务”旁边的框。
![Untick the box next to "Start the task only if the computer is on AC power."](https://i-blog.csdnimg.cn/blog_migrate/e4eb621dff498a7219240b354094e2f1.png)
Next, switch to the “Actions” tab and then click the “New” button to create a new action for the task.
接下来,切换到“动作”选项卡,然后单击“新建”按钮为任务创建一个新动作。
![Switch to the Actions tab and click "New" to create an action for the task.](https://i-blog.csdnimg.cn/blog_migrate/a29b7d268551771e90799fa3519848cf.png)
Now, click “Browse” to search for the application to run when you start the task.
现在,单击“浏览”以搜索启动任务时要运行的应用程序。
![Click "Browse."](https://i-blog.csdnimg.cn/blog_migrate/def17cae9350a7ca2de810de553ece6d.png)
Locate the application you want to start and then click “Open” after selecting it in File Explorer.
找到您要启动的应用程序,然后在“文件资源管理器”中选择它后单击“打开”。
![Locate the application you want to run and click "Open."](https://i-blog.csdnimg.cn/blog_migrate/b31c88c0b16df33502369db5303c5860.png)
Click “OK” to save the changes.
单击“确定”保存更改。
![Click "OK."](https://i-blog.csdnimg.cn/blog_migrate/cc23da2e9a2ab0040416a6e22bd63718.png)
Click “OK” one more time to finish the task creation process.
再单击一次“确定”以完成任务创建过程。
![Click "OK" to save changes.](https://i-blog.csdnimg.cn/blog_migrate/a16e9534e77bfabafc7d5ede7c0fef72.png)
After you create the task, that’s all you need to do for this part. If you want to make sure the task runs as expected, select the “Task Scheduler Library,” right-click on the task in the list, and then click “Run” from the context menu.
创建任务之后,这就是您要做的所有事情。 如果要确保任务按预期运行,请选择“任务计划程序库”,右键单击列表中的任务,然后从上下文菜单中单击“运行”。
![Find the task, right-click on it, and click "Run" to test that it works.](https://i-blog.csdnimg.cn/blog_migrate/98ae534d2a65ae9e6814230ca622eb5a.png)
Once all systems are go, close Task Scheduler, taking note of the name you used for the task.
所有系统运行完毕后,关闭Task Scheduler,并记下您用于该任务的名称。
如何创建快捷方式以启动任务 (How to Create the Shortcut to Start the Task)
Now that you’ve successfully made the task that will open the application, it’s time to create a shortcut that will run the task.
现在您已经成功完成了将打开应用程序的任务,现在该创建一个可以运行该任务的快捷方式了。
Right-click an empty spot on the Desktop and then select New > Shortcut from the context menu.
右键单击桌面上的空白处,然后从上下文菜单中选择“新建”>“快捷方式”。
![Create a new Shortcut on the desktop.](https://i-blog.csdnimg.cn/blog_migrate/d6844baa0c37ffd1cdfbef82d086a0d3.png)
In the window that appears, we need to type in the command that runs the scheduled task, replacing <taskName> with the task name we used from earlier. Be sure to keep the quotations around the name. It should look like this:
在出现的窗口中,我们需要输入运行计划任务的命令,将<taskName>替换为之前使用的任务名称。 确保在名称周围使用引号。 它看起来应该像这样:
schtasks /run /tn "<taskName>"
Click “Next” after you enter the command.
输入命令后,单击“下一步”。
![Type in the following command, making sure to use the name of the task you created earlier.](https://i-blog.csdnimg.cn/blog_migrate/c358e88efaa8f111aab1daf4829bf2ae.png)
Give the new shortcut a useful name and click “Finish” to create it.
给新的快捷方式起一个有用的名称,然后单击“完成”以创建它。
![Give the shortcut a name and click "Finish."](https://i-blog.csdnimg.cn/blog_migrate/10973fd81210c65bb4697d3a7ba95b7c.png)
Now, the desktop has a shortcut icon that will run the task that launches the application in Administrator mode—without a UAC prompt—when you double-click on it.
现在,桌面上有一个快捷方式图标,当您双击它时,该图标将运行在管理员模式下启动应用程序的任务(没有UAC提示)。
![Voila! A new shortcut that opens the application.](https://i-blog.csdnimg.cn/blog_migrate/3aba60bf0c98888f7523b1163d0f34fd.png)
However, the fun doesn’t end here. If you want to tweak it a bit more, right-click the shortcut and then select “Properties” from the context menu.
但是,乐趣并没有就此结束。 如果您想对其进行更多调整,请右键单击该快捷方式,然后从上下文菜单中选择“属性”。
![Open the Properties menu to tweak the shortcut even further.](https://i-blog.csdnimg.cn/blog_migrate/2cd37c6a7a7a15e2dd2c12120c629800.png)
Because the shortcut runs a command to start the task, Command Prompt will open for an instance, run the schtasks command, and then close before the application opens. If you want, you can set it to minimize when you open the shortcut, so Command Prompt doesn’t flash on the screen.
由于快捷方式运行命令来启动任务,因此命令提示符将为实例打开,运行schtasks命令,然后在应用程序打开之前关闭。 如果需要,可以在打开快捷方式时将其设置为最小,这样命令提示符不会在屏幕上闪烁。
Click the drop-down menu next to “Run” and choose “Minimized” from the list below.
单击“运行”旁边的下拉菜单,然后从下面的列表中选择“最小化”。
![Change the value next to "Run" to "Minimized" so that Command Prompt doesn't flash on the screen when run.](https://i-blog.csdnimg.cn/blog_migrate/46c7fe2861fb0adb459e9530780fee78.png)
Next, click “Change Icon” to personalize the shortcut’s icon.
接下来,单击“更改图标”以个性化快捷方式的图标。
![Next, change the icon.](https://i-blog.csdnimg.cn/blog_migrate/aea249231d797f0c33d669db71b9b3d1.png)
If you receive this message, don’t worry, just click “OK” to continue.
如果您收到此消息,请不要担心,只需单击“确定”继续。
![Click "OK" if you receive this warning.](https://i-blog.csdnimg.cn/blog_migrate/15e36833ff168368d7e87c638f81cf26.png)
Now, you can either scroll through the suggested icons or click “Browse” and locate the application that you’re opening with the task. Select “Open” to see its icons.
现在,您可以滚动浏览建议的图标,或单击“浏览”并找到要通过任务打开的应用程序。 选择“打开”以查看其图标。
![Locate the application file and click "Open" to see a list of its icons.](https://i-blog.csdnimg.cn/blog_migrate/c90076f21ad3eefd0b56586696ab63dc.png)
Select the application’s icon and click “OK” to save the changes.
选择应用程序的图标,然后单击“确定”以保存更改。
![Choose an icon from the list and click "OK" when done.](https://i-blog.csdnimg.cn/blog_migrate/0afc385b9d0dd6886f5e21a42c3d1819.png)
Select “OK” one more time to save all changes and return to the desktop.
再选择一次“确定”保存所有更改并返回桌面。
![Click "OK" to save changes and close the Properties menu.](https://i-blog.csdnimg.cn/blog_migrate/fa31e0c18e51c9a0e22408cf373e921d.png)
Now you have a shortcut that looks nice—even resembling the application you’re opening—and doesn’t have a pesky UAC prompt to get in your way.
现在,您有了一个看起来不错的快捷方式-甚至类似于您正在打开的应用程序-并且没有烦人的UAC提示妨碍您前进。
![Look at that beautiful icon. It resembles the regular application's icon exactly.](https://i-blog.csdnimg.cn/blog_migrate/fd639ab9937c571e2d69a1e4596ae0d4.png)
That’s all there is to it. Repeat this process for any other applications you regularly use to bypass the UAC prompts.
这里的所有都是它的。 对您经常用来绕过UAC提示的任何其他应用程序重复此过程。
uac管理员程序