I'm struggling with defining a single bat file which consists of some commands that need to run in admin mode and other in regular mode. (part 1:admin, part 2: normal, part 3: admin)
The closest solution I could think of is to define one files that call 3 different files. (The first part of file Init1, Init3 define admin mode which is copied from https://sites.google.com/site/eneerge/scripts/batchgotadmin)
Unfortunately it seems that the files are not executed one by one and I don't reach Init3.
I Defined the following files:
MainInit.bat
call Init1
call Init2
call Init3
Init1.bat:
// code from How to request Administrator access inside a batch file
echo "1"
exit
Init2.bat:
echo "2"
exit
Init3.bat:
// code from How to request Administrator access inside a batch file
echo "3"
exit