07-23-2023, 11:06 AM
I'd like to be able to pass the username variable to a cmd command in a batch script so I can see if the current user is an administrator. I tried this code `start cmd.exe /c "net user %username% > priv.txt"` It doesn't want to work though, whats the problem and is there a better way to do this? Any help or suggestions are appreciated. Thanks everyone.