Monday, November 24, 2008

patch.exe on vista - the workaround

Vista apparently thinks that any exe with 'patch' in it's name needs to be run with admin priviliges, probably to make a slew of pre-UAC install wizard patches work properly.

But this applies to good old unix:y 'patch' (which I have in windows-form) too!

Argh!

Update 2008-12-13: The patch.exe in the git-for-windows distribution (msysgit) seems to have the correct magic bits set to allow it to run without UAC getting in the way. So, try replacing your gnuwin32-patch (or whatever you're using) with that.

If that's not an option, here's how to do a workaround:




The trick is to rename patch.exe to pootch.exe (or whatever fancies you) and create a batch file call patch.cmd, with this content:

@"%~dp0\pootch" %*

That makes it work.

(I learn this when running the unit tests of buildbot, a pretty nice tool for distributing automated tests across compilers, computers & os:es!)
Post a Comment