How To Check For Admin Rights Using VBScript

I needed to write a vbscript that would check whether interactive users had admin rights before running its course. So, how do you check for elevated permissions using vbscript? I had a few ideas in mind but I decided to do some Googling anyway. I searched the web far and wide but couldn’t find anything ideal. I came across many solutions including: Checking whether the user was in the local admins group. Running certain Windows utilities, such as defrag, openfiles, or net (net session). Attempting to access files, folders, registry keys, or registry values restricted to only admins. I...

Read More