Administrator account in .bat

0

I am programming a .bat that opens a file as an administrator with a runas. This is the (simple) code:

runas /user:%computername%\%username% /savecred "C:\Users\Usuario\Desktop\ola.bat"

Like I can automatically type the name of the computer, with% computername%, and just like I can automatically type the username, with% username%, I would like to know if there is a% adminname% I know I can do net localgroup administradores but not on all computers there is a localgroup called administrators (they are called administrators ) Thanks in advance.

    
asked by Qwerty 02.06.2018 в 16:24
source

0 answers