Just a few lines of code in a batch file will check if the batch file is executed with full administrator rights. This is great in eg. Win7 enviroments and when used with superusers who tends to forget :)
AT > NUL
IF %ERRORLEVEL% EQU 0 (
) ELSE (
ECHO Script must run as admin, exiting...
EXIT /B 1