I have a batch file with the following command in it...
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"||(
goto Admin_Error
If I use autoit to run this batch file, I get an Admin Error but if I double click the batch file, it works fine.
Strangely enough, if I run it on a 32bit OS with autoit, it works as well. I am only seeing this on x64 - specifically windows 7. Untested on XP. But, as I said, even under X64, if I double click the file to open it, it works as expected.