Windows UAC and bash's "Bad File Number" error

Today's problem: trying to run a freshly compiled setup_driver.exe from MSYS/MinGW produces the following:
sh: ./setup_driver.exe: Bad file number
The reason: Microsoft's implementation of UAC will try to give a free pass to any application that has "setup" in its name, and run it in elevated mode (after asking for confirmation).
This doesn't fare well with most shells running on Windows, as they don't know how to call the UAC elevation process, and you get the error above.

Rename your application to something that does not contain "setup" and your problem is gone.
Also applies to variations of "install" in your name.

No comments:

Post a Comment