I am using Albacore and I want to run a batch file that needs to be elevated as Administrator.
The rights are checked as:
Batch file:
AT > NUL
IF %ERRORLEVEL% NEQ 0 GOTO AdminRightError
:: more code here
:AdminRightError
ECHO You are not running as administrator!
Rakefile:
exec :CmdRunBatch do |cmd|
cmd.command = "RunCommands.bat"
end
When I execute rake CmdRunBatch
through a normal (non-elevated) command-line I get the AdminRightError described in the batch file. Is there a way to solve this issue?