Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: How to tell if a user is running as Administrator?

26 Nov 2009   #1

Windows 7 RTM x86/x64
 
 
How to tell if a user is running as Administrator?

I am writing a batch file for a group of people that might or might not know how to run as admin. I would like to know if there are any files or varibles that are different for the admin or the current user.


My System SpecsSystem Spec
.

26 Nov 2009   #2

Win 8 Release candidate 8400
 
 

Quote   Quote: Originally Posted by abuttino View Post
I am writing a batch file for a group of people that might or might not know how to run as admin. I would like to know if there are any files or varibles that are different for the admin or the current user.
Hi and welcome

sure there are tons. group mebership, gpedit, users cpanel, what exactly are you trying to do? Id the ones who are, or arent running as admin?


Kenn J++
My System SpecsSystem Spec
26 Nov 2009   #3

Vista Ult64, Win7600
 
 

Well a quick way to see if you are running as the Admin is to click, Start and at the top of the Menu Screen
click the picture and it willl tell you on the righthand side, I am not sure what you mean in the second part of
your question, Sorry.


How to tell if a user is running as Administrator?-capturepp.png


My System SpecsSystem Spec
.


26 Nov 2009   #4

Windows 7 Ultimate x64 x2 + x86 + Windows 8.1 x64 x2
 
 

Quote   Quote: Originally Posted by abuttino View Post
I am writing a batch file for a group of people that might or might not know how to run as admin. I would like to know if there are any files or varibles that are different for the admin or the current user.

If you are needing to identify the privilege level of a user programatically and act on this information - I think you would be better looking to write your code in PowerShell rather in a simple batch.

I believe that PS has all the tools you will need. I have not worked with it personally yet, (it's on my ToDo list ).

There are a lot of tutorials available on he web and I have seen sites that will help you with specific problems that arise
My System SpecsSystem Spec
26 Nov 2009   #5

Windows 7 RTM x86/x64
 
 

I am looking to identify the privilege level automatied from the batch file. "If not admin, goto end" kinda thing.
My System SpecsSystem Spec
26 Nov 2009   #6

Windows 7 Ultimate x64 x2 + x86 + Windows 8.1 x64 x2
 
 

As I said above I believe that Powershell will have this type of functionality - but do not have the actual experience with it to guide you further.

There may be other members here, of course, who do have this knowledge.

Other than this possibility I can only suggest you check out Microsoft themselves or one of the many tutorials.

There are many

As this illustrates ....

powershell tutorials - Google Search
My System SpecsSystem Spec
Reply

 How to tell if a user is running as Administrator?




Thread Tools




Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 08:26 PM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33