Windows Media Center app and UAC
I am currently trying to write a Windows Media Center (Vista) application 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 Denied error.
I believe this is because Window Media Center applications are running Windows Media Center and therefore needs to be started as an administrator to do this. Does anyone know how I can achieve this using UAC?
+1
a source to share
2 answers
You can mark your process as it needs to be increased by adding
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" name="CheckForceElevation" type="win32"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="requireAdministrator"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
The manifesto.
0
a source to share