# Running a task as Administrator on Vista + UAC

**URL:** https://www.finalbuilder.com/forums/t/running-a-task-as-administrator-on-vista-uac/407
**Category:** Discussion
**Created:** [March 23, 2007, 1:08am UTC](https://www.finalbuilder.com/forums/t/running-a-task-as-administrator-on-vista-uac/407 "2007-03-23T01:08:26Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![tadr](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/t/34f0e0/32.png) [@tadr](https://www.finalbuilder.com/forums/u/tadr)
#### Post date: [March 23, 2007, 1:08am UTC](https://www.finalbuilder.com/forums/t/running-a-task-as-administrator-on-vista-uac/407/1 "2007-03-23T01:08:26Z")

</div>

I have a simple project that requires three things:  
1. stop a specific service  
2. create a zip from a directory tree  
3. restart the service  
  
I’d like to run this project as a scheduled job on Vista with UAC enabled. Project fails at step #1, because it doesn’t have sufficient privileges due to UAC. Is there any way to elevate job’s privileges? Bear in mind that this job needs to run unattended, so answering any consent dialogs is out of the question.  
  
TIA

---

<div class="post-metadata">

### Author: ![tate](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/t/e19b73/32.png) [@tate](https://www.finalbuilder.com/forums/u/tate)
#### Post date: [March 23, 2007, 2:31am UTC](https://www.finalbuilder.com/forums/t/running-a-task-as-administrator-on-vista-uac/407/2 "2007-03-23T02:31:35Z")

</div>

Hi Tadej,  
  
You could run the entire build with higher privileges - you can do this by editing the scheduled task and changing the username/password. Also, _some_ actions support being run with a different username/password, but unfortunately the Control NT Service isn’t one of them. So, best thing to do would be to run the entire project under a differnet user.  
  
.t8

---

<div class="post-metadata">

### Author: ![tadr](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/t/34f0e0/32.png) [@tadr](https://www.finalbuilder.com/forums/u/tadr)
#### Post date: [March 23, 2007, 4:58am UTC](https://www.finalbuilder.com/forums/t/running-a-task-as-administrator-on-vista-uac/407/3 "2007-03-23T04:58:25Z")

</div>

I realized there was a setting in Vista’s Task Scheduler, called “Run with highest privileges”, that can be toggled on a per job basis. It did the trick.  
Thanks anyway!
