I lost a few hours to this because it's so quirky and easy to forget. This happened during the compilation of a certain library, which created an install.exe program to move files around the filesystem. That stupid UAC dialog was not even kicking-in and basically the copying just died.
1) Write a little, one-off initialization script (I forget what it did -- probably copied a few files from point A to point B). Expect this task to take about five minutes.
2) Four hours later you discover that merely calling that stupid little script 'setup.cmd' caused all kinds of UAC havoc to ensue. Bang head against desk.
So, now I know. But it sure was counter-intuitive, and (I suggest) more than a little ham-handed on Microsoft's part.
Don't get me started about significant trailing spaces in environment variables (another little gift of non-intuitive behavior in the MS environment).
The number of users who run legacy installers and expect them to work exceeds the number of users who write "little, one-off installation scripts" by several orders of magnitude.