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
abuttino

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
zigzag3143

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
jfar

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.


-capturepp.png


My System SpecsSystem Spec
.

26 Nov 2009   #4
Barman58

Windows 10 Pro x64 x2 Windows 10 Enterprise x64, Ubuntu
 
 

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
abuttino

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
Barman58

Windows 10 Pro x64 x2 Windows 10 Enterprise x64, Ubuntu
 
 

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




Similar help and support threads
Thread Forum
Relationship between standard user, administrator user and UAC
There has long been, and I guess still is, advice to use a standard user rather than administrator account to limit the things that can be done by malware. Until recently I've always used an administrator account despite this advice. After recently seeing a report stating that an extremely...
System Security
No Administrator shown in User Account, but shows in C:\User ?
Hello, Cousin has an old Toshiba he bought pre loaded with W7 Home Premium. He was running it as he got it and I had him add a standard user account for general use and a quasi-administator account for working. He has been running that way for a while. Today I needed him to look in the C:\ Users...
General Discussion
User Administrator Account won't allow Administrator Privilages
Hi, I'm running Win 7 Pro x64 and Office 2007. I installed a Bluetooth transceiver recently and developed a problem when replying to email in Outlook 2007. When I select an email to reply, the email editor pops up with a "Custom UI Runtime Error in Send to Bluetooth." The solution to this issue...
General Discussion
User is both an Administrator, and not an Administrator. Cannot change
An account on my Windows 7 installation cannot have its type changed from an administrator to a user account. I tried to change it using the cmd and I'm getting these messages: >net localgroup administrators AccountName /del System error 1377 has occurred. The specified account name is...
General Discussion
Running in User Mode vs Administrator Mode
I'm using the trial version of Win 7 Enterprise and run in user mode. When I installed Google Chrome, I was expecting a prompt requesting my admin ID password. This did not happen and Chrome just installed itself. The same was seen when I installed the Picnik extension for Chrome. However,...
General Discussion
Running everything as administrator...why?
Finally got x64 RTM installed tonight and everything worked out...mostly. My problem is that I have to run almost everything as an administrator. If I don't, the app will open briefly, then close. But it stays running under just a few megs of RAM in the Task Manager. Happens on Firefox, IE 8...
Software


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 02:22.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App