Will all the programs inside the batch file be executed as administrator?
Yes. Running a batch script as administrator also runs processes started by the script with admin rights.
Here's an experiment you can try if you'd like to verify it yourself. I verified this experimentally by trying it myself.
Here was my test, which uses gpedit.msc
. If you try opening this without administrative rights, you will get an MMC warning and then a limited console window will open up. If you open it with admin rights, it opens normally.
- I created a batch script that contained, simply,
start gpedit.msc
- I created a shortcut to the batch script
- I changed the advanced properties to
Run As Administrator
When executing the shortcut, a UAC prompt appears, authorizing the batch script to run with elevated privileges. Unsurprisingly, anything executed by the batch script also runs with administrative rights.