Menu

#412 Running patch.exe in vista invokes UAC

Patch
open
nobody
Binaries (396)
5
2014-08-01
2008-02-11
patria
No

The version resource in patch.exe contains the keyword "patch" which triggers a UAC (User Account Control) dialog as the application compatibility database recognizes that such applications requires an administrative privileges. In most cases patch.exe does not require administrative privileges. It will mitigate UAC dialog invocation to embed a manifest (RT_MANIFEST 101) such that patch.exe does not require such privileges as below.

<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestversion="1.0">
<trustinfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedprivileges>
<requestedexecutionlevel level="asInvoker" uiaccess="false">
</requestedexecutionlevel></requestedprivileges>
</security>
</trustinfo>
</assembly>

Discussion

  • Trejkaz

    Trejkaz - 2008-06-26

    Logged In: YES
    user_id=639492
    Originator: NO

    +1, this causes huge problems if you're trying to automate a build.

     
  • Adrian Wilkins

    Adrian Wilkins - 2008-06-27

    Logged In: YES
    user_id=718275
    Originator: NO

    I can confirm that this works ; I was able to render v 2.5.9 non-UAC by using a resource editor to insert a trustInfo manifest into the file.

    I used

    <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestversion="1.0">
    <assemblyidentity name="org.gnu.patch" processorarchitecture="x86" version="1.0.0.0" type="win32">
    <description>GNU patch</description>
    <trustinfo xmlns="urn:schemas-microsoft-com:asm.v2">
    <security>
    <requestedprivileges>
    <requestedexecutionlevel level="asInvoker" uiaccess="false">
    </requestedexecutionlevel></requestedprivileges>
    </security>
    </trustinfo>
    </assemblyidentity></assembly>

     
  • Marcus Lindblom Sonestedt

    +1. I agree with trejkas. This is a nuisance when using locally (especially through other tools) and really troublesome when automating stuff. (i.e. BuildBot and similar tools that run as a non-administrator service user.)

     
  • Alexandre Jasmin

    +1, An annoying bug

     
  • Dimitry Polivaev

    +1

     
  • Jason R. Coombs

    Jason R. Coombs - 2010-04-06

    +1
    I could really use a fix for this.

     
  • Kirill Müller

    Kirill Müller - 2010-05-13

    This bug is fixed with the current package version of patch (2.5.9-7). After installation through GetGnuWin32, there is a patch.exe.manifest that takes care of removing the UAC message.

     
  • Justin Dearing

    Justin Dearing - 2010-11-28

    When I install GetGnuWin32 I end up with a 0 byte patch.exe. If I copy the manifest to the same folder as patch.exe installed via the standalone NSIS installer, I get a popup windows saying I dont have enough privileges.

     
  • Anonymous

    Anonymous - 2013-02-15

    Under Windows 8 patch.exe crashes all times. What can I do?

     
  • Peter Tandler

    Peter Tandler - 2013-11-05

    @Kirill Müller - I just installed patch 2.5.9-7 but the patch.exe still triggers a UAC dialog

     
  • Peter Tandler

    Peter Tandler - 2013-11-05
     
  • Joseph Heenan

    Joseph Heenan - 2014-08-01

    Same as above posted - patch-2.5.9-7 definitely has problems on windows 8.

    I found a patch that works out of the box - the one packaged with git is fine - http://git-scm.com/download/win

     
MongoDB Logo MongoDB