How Do I Check if My Account Is an Administrator

  • Thread starter Thread starter Mike McCollister
  • Start date Start date
M

Mike McCollister

Is there a way from a batch file to determine if the current user is an
administrator? I'm hoping for a single command.

Thanks,

Mike
 
Hi Mike,

There is no need to use a batch file. If you type in 'control
userpasswords2' in the search box on the start menu it will bring up the
'Advanced User Accounts Control Panel' - note that you will need to provide
administrative priviledges to start it. The 'Users' tab gives details of all
activated accounts on your computer, including the type of account that is
assigned for each one.
Dwarf
 
Thanks.

However, there is a need.

I have a batch file that needs to run as an administrator. I want write a
conditional that if not admin account then echo message stating that batch
file must be run as admin.

Thanks,

Mike
 
Back
Top