Who’s a Local Adminstrator?

Here’s VBScript code you can use in a login script or from SMS to find out who has administrator rights on a PC:

‘ Variables
Dim objFileSystem, objOutputFile
Dim strOutputFile

‘ Init objects
Set Shell = CreateObject(“WScript.Shell”)
Set oNet= WScript.CreateObject(“WScript.Network”)
Set filesys = CreateObject(“Scripting.FileSystemObject”)

‘ Grab computername
computername = Shell.ExpandEnvironmentStrings(“%computername%”)

‘ See if we can do something “Admin” like
if filesys.FolderExists(“\” & computername & “Admin$System32”) then
‘ Grab username
oUser = oNet.UserName
‘ Set filename to computername.username.txt
strOutputFile=computername & “.” & oUser & “.txt”
Set objOutputFile = filesys.CreateTextFile(strOutputFile, TRUE)
‘Close file
objOutputFile.Close
Set objFileSystem = Nothing
end if

Only users with administrator rights can get to administrative shares. So if we can get to \mycomputerAdmin$System32: we are an administrator. The script then writes out the logged in user’s name to a file in the format of computername.username.txt.


Note: The appending of .txt is purely for cosmetic reasons. The script comes from two parts of source code I “stole” from the Internet. Also, if you want the file written out to a specific server share: append \yourserveryourshare before computername set by strOutputFile

Soli Deo Gloria

Utility Review: Alcohol 52%

It sometimes is hard finding software that will work on Windows Vista. Case in point: finding software that will load ISO images as a drive letter. On Windows XP, I use to use CloneVirtualDrive by SlySoft. Unfortunately, this software does not work on Vista. The challenge is to find something free, reliable and of course, Vista compatible.

Installation is pretty straight forward: the first part will require a reboot. After the reboot, you need to run the setup again. During the setup, you are offered a “free toolbar”. You can decline the installation of this toolbar.

Usage is pretty easy: launch Alcohol 52% and add your ISO image to the list. It keeps a list of the current ISOs you have loaded recently. Then, right-click on the ISO and choose “Mount on Device”. The CD or DVD is then loaded as a virtual drive letter.

The utility also has a neat ISO maker. Place a CD or DVD into the drive and click through the wizard: nothing could be easier. This utility would be so sweet if it would write CDs/DVDs as well. Alas, it is freeware, so you can’t ask too much.

Note that the license states this is for home and personal use only.

Verdict: 4 stars

– Soli Deo Gloria