On Windows 10. Steps to reproduce problem.
1) Use subst from command line to setup a drive letter. e.g.: subst v: c:\temp
2) Create a batch file c:\temp\hello.bat:
echo hello
pause
3) in windows explorer, go to v: drive. Try to run hello.bat by right clicking, and selecting Run As Administrator. The expected Windows security question "Do you want to allow this app to make changes to your device?" comes up. When you answer Yes, nothing seems to happen. I know I can go to c:\temp in Windows Explorer, and this will work, but it's not ideal.
I gather it is something to do with Run As Administrator context not being able to see the subst drive? Are there any workarounds, to be able to get this to work? So that batch files can be run in Windows Explorer on the subst drive as Administrator.
EDIT: A workaround of sorts: In Windows Explorer, go to c: drive. Then c:\temp. Create a shortcut to hello.bat. Also tick the Run as Administrator option.
In Windows Explorer, go back to v: drive. Double click the shortcut to run hello.bat as administrator. This seems to work.
Mods: feel free to move this question to Superuser, if it turns out there is nothing you can do in the batch file itself to make this work.