This is a great way to test:
whoami /groups | findstr /b BUILTIN\Administrators | findstr /c:"Enabled group" && GOTO RunningAsAdmin ECHO This must be run as AdministratorGOTO NotRunningAsAdmin :RunningAsAdmin
whoami /groups | findstr /b BUILTIN\Administrators | findstr /c:"Enabled group" && GOTO RunningAsAdmin ECHO This must be run as AdministratorGOTO NotRunningAsAdmin :RunningAsAdmin
<manifestclasspath property="manifest.classpath"
jarfile="target/classpathSupplier.jar"
maxParentLevels="99"> <classpath refid="maven.compile.classpath" /> </manifestclasspath>
<!-- Create pathing Jar --><jar destfile="target/classpathSupplier.jar"> <manifest> <attribute name="Class-Path" value="${manifest.classpath}"/> </manifest> </jar>
<java classname="org.me.ClassToRun" fork="yes" failonerror="true"> <arg value="-someArg" />
<!--<jvmarg value="-Xdebug"/>-->
<!--<jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"/>--> <classpath> <pathelement location="target/classpathSupplier.jar"/> </classpath> </java>