Batch file needs UAC

I have a few batch files that run on a schedule, I have found though that they are not running properly? If I right click the batch file and run as administrator it works fine, after some research I came up with this.

set __COMPAT_LAYER=RunAsInvoker

I add this as the start of my batch files and now they run fine via the schedule. This seems to work on Windows 7 and server 2008, I will not take responsibility if this dopes not work for you.

Was this post helpful?

Total Page Visits: 1517 - Today Page Visits: 3