R – Windows Media Center Application and UAC

mediacenterSecurityuacwindows-vista

I'm currently trying to write a Windows Media Center Application (Vista) that can restart a service with UAC enabled. Everything works fine when UAC is disabled but as soon as UAC is enabled I get an Access is Denied error.

I believe this is because the Window Media Center applications are running under the Windows Media Center process and as such would need to be started as Administrator for this to work. Does anyone know how I might achieve this with UAC enabled?

Best Answer

Check this out. Sounds like you'll need to flag the process to ask UAC for permission to continue:

http://technet.microsoft.com/en-us/magazine/cc138019.aspx