English
Source / code snippets

Admin one Verify

 

Jac
de
Lad
Hi,

how can one in XProfan rausfinden, whether the actually user Admin is, To whom Benutzergruppen it heard or. whether it of/ one designed group angehört???

Jac
 
Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE)
Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP
06/17/06  
 




ToM
Hi!

How one rausfindet whether one To Admin group heard is easy, probier simply The
svchost.exe To terminate. ifs goes are admin, otherwise User oda so.
svchost.exe launch itself eh automatically new. think the is alike if mans so resolve.

mfg tom
 
AMD Athlon 64 4500+ / 1500 MB Ram / Windows Server 2003 Enterprise / Profan 7.0
06/21/06  
 




Jac
de
Lad
is not integrally beautiful sour a Process To terminate circa rauszufinden whether one Admin is? there must it still others, konventionellere modes give...nevertheless thanks!

Jac
 
Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE)
Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP
06/22/06  
 




Alfred
Wagner
Hello Jac Dou you mean something like
CompileMarkSeparation
DEF @CheckTokenMembership(3) !"advapi32","CheckTokenMembership"
DEF @GetProcAddress(2) !"KERNEL32","GetProcAddress"
DEF @GetModuleHandle(1) !"KERNEL32","GetModuleHandleA"
Declare Member&,SID#,MHANDLE&,Module$,Funktion$
LET MODULE$=$SYSPATH+"Advapi32.DLL"
LET Funktion$="CheckTokenMembership"
LET MHANDLE&=@GetModuleHandle(@ADDR(Module$))

IF @GetProcAddress(MHANDLE&,@ADDR(FUNKTION$))<>0

    DIM SID#,16
    LONG SID#,0=513
    LONG SID#,4=83886080
    LONG SID#,8=32
    LONG SID#,12=544
    @CheckTokenMembership(0,SID#,@ADDR(Member&))

    IF Member&=1

        @Messagebox("Du bist auf deinem Rechner ein Administrator!","Admincheck",64)

    else

        @Messagebox("Du hast keine Administratorrechte!","Admincheck",64)

    endif

    DISPOSE SID#

else

    @MESSAGEBOX("Falsche Windowsversion","Son Scheiß!",64)

endif


I faith the code stammt of Andreas Hötker

Regards

Alfred with family
 
WinXP-Home ,XProfan10

Alfreds ... Freeware :  [...] 
06/25/06  
 




Jac
de
Lad
the sees integrally thereafter from. I could it of course not yet try, make I but immediately!

thanks,
Jac
 
Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE)
Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP
06/25/06  
 




CompileMarkSeparation
Def OpenSCManager(3) !"Advapi32.dll", "OpenSCManagerA"
Def CloseServiceHandle(1) !"Advapi32.dll", "CloseServiceHandle"
Def &SC_MANAGER_ALL_ACCESS 983055

Proc IsAdmin

    Declare Result&
    Result& = OpenSCManager(0, 0, &SC_MANAGER_ALL_ACCESS)

    If Result&

        CloseServiceHandle(Result&)
        Return 1

    EndIf

    Return 0

EndProc

Print IsAdmin()
WaitKey
 
06/25/06  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

8.376 Views

Untitledvor 0 min.
H.Brill03/31/23
Uwe Lang09/18/22
Wolfgang Laube04/05/18
holmol9306/03/13
More...

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie