home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.msdos.batch      Fun with MS-DOS batch files      42,547 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 42,099 of 42,547   
   T to All   
   Re: I need to check if I am running as A   
   11 Nov 22 23:23:48   
   
   From: T@invalid.invalid   
      
   On 11/11/22 22:27, JJ wrote:   
   > On Fri, 11 Nov 2022 21:38:46 -0800, T wrote:   
   >> Hi All,   
   >>   
   >> Is there a simple command line I can throw   
   >> to tell me if I am running as administrator?   
   >>   
   >> Many thanks,   
   >> -T   
   >   
   > You can use: fsutil /?   
   >   
   > It'll tell you by a message and ERRORLEVEL=1 if there's no admin rights.   
   >   
   > If there's admin rights, it'll simply display fsutil's help and with   
   > ERRORLEVEL=0.   
      
   Windows 11 pro 22H2   
      
   C:\NtUtil>type Windows.RaidCheck.pl6.bat   
   @echo off   
   fsutil /? > nul   
   echo %ERRORLEVEL%   
      
      
   As an administrator:   
   C:\NtUtil>Windows.RaidCheck.pl6.bat   
   1   
      
      
   This is because   
       fsutil /?   
       /? is an invalid parameter.   
      
   RATS !!!   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca