The Blog
 
GODJonez's Workshop - Xfire + Windows UAC
2009-07-03 1:39 PM PDT
Starting from Windows Vista Microsoft has included a component called User Account Control to Windows operating system. The purpose of UAC is, contrary to popular belief, to make software developers create programs that do not require administrative permissions for normal operation. The other function of UAC is to let the user know when a program might be trying to do something that can change the system settings and give an option to prevent it from happening.

Xfire does not require administrative permissions for its normal operation and does not ask for it unless needed. Of course full Xfire updates do require elevation since installing or updating programs is altering the system and therefore requires administrator permission. Even still, for most people who have UAC enabled, Xfire does ask for permission on every launch.

The reason for Xfire asking for administrative permissions even when it is not updating is to be able to support games that require administrator permissions. If Xfire detects even one game installed on your computer that runs as admin, Xfire will ask you for admin permissions to be able to support the game in question. Normally you get a message from Xfire listing the games that were found to need elevation, after which UAC will kick in and ask if you really want to let Xfire elevate itself.

Even though you can select to never display the list of games requiring elevation, there is no option to tell Windows to not ask every time if Xfire is allowed to have full access or not. Of course disabling UAC will get rid of the message but will also disable one of the most core security features of Windows at the same time, so you do not want to do it.

Here I give you instructions on how to make Windows automatically start Xfire as administrator without prompting the UAC dialog every time. Note that you might still get the UAC dialog when updating Xfire, however.

Starting Xfire with administator permissions without UAC dialog

The trick I show you here is to use Task Scheduler to run Xfire with elevated permissions. Of course this trick could be used for any program, but you need to remember that the point of UAC is to inform the user whenever a program tries to gain access to the system.

1. From Start menu open Control Panel
2. Switch to Classic view (if not already)
3. Select Administrative Tools
4. Select Task Scheduler

5. Windows will ask for admin permissions to access Task Scheduler. Allow them.
6. Now click on Create Task... (see image below)


7. As Name type in XfireNoUAC
8. Make sure to check Run with highest privileges checkbox on the General tab
- If you are on Windows 7, select Windows 7 from the Configure for drop-down.


9. On Actions tab click New...
10. For Action select Start a program
11. For Program/script navigate to xfire.exe (typically "C:\Program Files (x86)\Xfire\Xfire.exe"


12. Press OK
13. On Conditions tab you might want to uncheck the boxes under Power, unless you want Xfire to not be usable when the computer is on battery power (portable computers only)
14. On Settings tab you want to uncheck the Stop the task if it runs longer than box
15. Click OK
16. Close Task Scheduler
17. From Start menu, choose All Programs and open the Startup folder
18. Right click on Xfire link there and select Properties


19. Change to Shortcut tab
20. Change the text in Target field to read schtasks.exe /run /tn XfireNoUAC
21. For Run choose Minimized


22. Press OK


Now the shortcut that starts Xfire on every boot is modified to start Xfire using the elevated task. Since the task is started by the system itself, it will not ask for permissions, it trusts that you know what you are doing when you gave the permission in Task Scheduler.

Let me know in comments if this was helpful and if it worked for you. Thank you again for following the blog!

Joonas
views: 11866
Comments
 1   2   3   4 
REMOVE ME I DON'T USE XF (zedomann) 2009-07-03 7:11 PM PDT
I just have UAC turned off because it gets so damn annoying.
godjonez (godjonez) 2009-07-04 5:16 AM PDT
I like to have more control over my system, so I like UAC. No program can get to do bad things unless I allow them to. But it does get a bit annoying when it asks for the permission daily for Xfire when I know I would be always granting the permission. So by this method I can make Xfire start up without asking for permission while still retaining UAC keeping the rest of my system secure.
Alexín Din Dín (nsx01) 2009-07-04 11:21 AM PDT
Thanks! it really helps!

Hasta la vista UAC.
Kumbol (kumbol) 2009-07-06 1:26 PM PDT
Hey, thanks for this Joonas, this trick really rocks!
Devboy (devboy2007) 2009-07-20 12:55 AM PDT
Fantastico! works perefect.
Lord_Henkutt (filureen) 2009-08-09 6:25 AM PDT
Thanks, you're the hero!
screw+u (unscrewu) 2009-09-29 4:38 PM PDT
Works perfectly Thanks for the tip!
Pando Cakes™ (koolaid4eva) 2009-10-24 8:43 AM PDT
Some questions:
First is the task supposed to be runnning or in ready mode.
Second when you change the target the icon changes right?
Third you launch xfire using the new icon right?
Fourth how is the launch supposed to look like?
Thx
Pando Cakes™ (koolaid4eva) 2009-10-24 12:05 PM PDT
Did everthing yet it still didnt work. I still need admin password everytime xfire starts. Can anyone help me? One question, is the start in box for the startup xfire properties supposed to be empty lik yours??
Shadow Aspect (shadowaspect) 2009-10-28 11:13 AM PDT
The box doesn't need to be empty Koolaid.

Thanks for this how-to, very helpful
 1   2   3   4