需要uac交互的程序如何自启动

Autostart application that requires UAC on user logon in windows 7 without verifying them

I wanted to make windows autorun some application (like  openvpn-gui and  SQL 2005 Service Manager) whenever I logged in in order to have them loaded in the tray. Placing them in the Startup folder would autostart them but I had to confirm both of them in the UAC (User Account Control) since they both run as administrator. In order to bypass this, I had to schedule them in the windows scheduler. In order to do so you must follow the following steps.


Press the windows key and type “Task Scheduler” or any part of it to launch (by pressing enter when you have it selected in the results) Task Scheduler.

In the actions menu on the right, click “Create task”



In the “General” tab, you must specify the task’s name (which you will not be able to change once you have created the task) and you must also check the “Run with highest privileges” checkbox. This checkbox forces windows to run the application in a higher security context and the application doesn’t require the UAC verification. I also change “Configure for:” drop down in order to reflect my current operating system, but you may choose a previous configuration for better compatibility.



In the “Triggers” tab, you must add a logon trigger by pressing the “New…” button.



In the “New trigger” window you must select “At log on” in the “Begin the task:” drop down list and then you may specify that the task will be running only on specific user, if you like, as seen in the next image.


In the “Actions” tab, you will have to specify the program that you want to run, by clicking the “New…” button.


Select the program (by clicking “Browse…”) and then press the OK button.



If you are tempted to add more than one application in this tab, think again, since Task Scheduler waits for the first application to close in order to proceed to the next one. In my case that I wanted two applications to run on log and stay for the rest of the session, I had to create two separate tasks.

The next steps are optional.

In the “Conditions” tab, I personally uncheck the “Start the task only if the computer is on AC power”.



Finally in the “Settings” tab I also uncheck both “Stop the task if it runs longer than” (since I want it to be running for ever) and the “If the running task does not end when requested, force it to stop” checkboxes.



Click OK and you are ready to go. In order to modify the task you may select it in the main panel as shown in the following image.


Enjoy!
NO COMMENTS:
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值