views:

617

answers:

2

[I'm sorry that this isn't directly a programming question. But I have recently switched to a new Vista machine where I am keeping UAC enabled (please don't tell me to disable it, it's not an option).]

Every time I run gnu's patch.exe I get an elevation dialog from Vista. If I rename patch.exe to foo.exe it does not do this, so I assume this is one of Vista's "heuristics".

Does anyone know how to disable this? It's driving me nuts and the Googles aren't helping.

Or should I add a manifest just for patch.exe to tell the system NOT to try to elevate this? Will that work, and if so how do you make such a manifest?

Thanks so much, been banging my head against the wall for an hour on this so far.

+2  A: 

From:
http://social.msdn.microsoft.com/Forums/en-US/windowsgeneraldevelopmentissues/thread/bf4f7dfa-5553-41d3-9c8e-311ee4a88599/

If you can add a manifest to the affected executable declaring a requestedExecutionLevel of 'asInvoker' it should stop prompting.

Associated guide on UAC architecture and converting existing applications so they work correctly (near the bottom fifth of the page):

http://technet.microsoft.com/en-us/library/cc709628.aspx

Lastly, how to write such a manifest:

http://www.google.com/search?q=writing+a+uac+manifest

Adam Davis
+2  A: 

A sample UAC "asInvoker" manifest:

<?xml version="1.0" encoding="utf-8"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
   <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
      <security>
         <requestedPrivileges>
            <requestedExecutionLevel level="asInvoker" />
         </requestedPrivileges>
      </security>
   </trustInfo>
</assembly>
Ian Boyd