SyntaxFix
Write A Post
Hire A Developer
Questions
The complete solution I found that worked was:
@echo off cd /D "%~dp0" if not "%1"=="am_admin" (powershell start -verb runas '%0' am_admin & exit /b) "Put your command here"
credit for: https://stackoverflow.com/a/51472107/15087068
https://serverfault.com/a/95696