Is administrator account

Just starting out? Need help? Post your questions and find answers here.
boyoss
User
User
Posts: 74
Joined: Fri Feb 05, 2016 10:11 am

Is administrator account

Post by boyoss »

Is there any function to know if the windows-user-account is local or administrator?

thanks
User avatar
skywalk
Addict
Addict
Posts: 3972
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: Is administrator account

Post by skywalk »

IsUserAnAdmin_()
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
boyoss
User
User
Posts: 74
Joined: Fri Feb 05, 2016 10:11 am

Re: Is administrator account

Post by boyoss »

Thanks, but it return 0, and i AM administrator!!
User avatar
mk-soft
Always Here
Always Here
Posts: 5335
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Is administrator account

Post by mk-soft »

Set compiler option 'Request Administrator mode...'

Code: Select all

r1 = IsUserAnAdmin_()
If r1
  MessageRequester("Info", "Is Admin")
Else
  MessageRequester("Info", "Is not Admin")
EndIf
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
boyoss
User
User
Posts: 74
Joined: Fri Feb 05, 2016 10:11 am

Re: Is administrator account

Post by boyoss »

Much thanks
User avatar
skywalk
Addict
Addict
Posts: 3972
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: Is administrator account

Post by skywalk »

Sorry, I did not require
[x] Request Administrator mode for Windows Vista and above.
on Windows 10. But, I have UAC off.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
User avatar
mk-soft
Always Here
Always Here
Posts: 5335
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Is administrator account

Post by mk-soft »

skywalk wrote:Sorry, I did not require
[x] Request Administrator mode for Windows Vista and above.
on Windows 10. But, I have UAC off.
Not good idea the UAC switch off
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
User avatar
skywalk
Addict
Addict
Posts: 3972
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: Is administrator account

Post by skywalk »

I do use other means of protection.
Constant UAC prompts are no protection if I pick up my computer and throw it against a wall. :evil:
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
User avatar
mk-soft
Always Here
Always Here
Posts: 5335
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Is administrator account

Post by mk-soft »

Why be loud ...
If you use a different protection, that is good
But as a first protection, I consider UAC to be useful. If not as last protection.

So everyone has his opinion :wink:
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
User avatar
skywalk
Addict
Addict
Posts: 3972
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: Is administrator account

Post by skywalk »

Haha, not being loud at you. I was trashing UAC, the thief of clicks. :!:
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Manuel
User
User
Posts: 14
Joined: Thu Mar 02, 2017 11:15 pm
Location: Barcelona

Re: Is administrator account

Post by Manuel »

mk-soft wrote:Set compiler option 'Request Administrator mode...'
That totally defeats the purpose. Use IsUserAdmin_() instead.
IdeasVacuum
Always Here
Always Here
Posts: 6425
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Is administrator account

Post by IdeasVacuum »

UAC is a nightmare! I have wasted a countless number of hours helping CAD-CAM customers whose PC grinds to a standstill with UAC deployed.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
Post Reply