The following code uses the Windwos 2OOO RSK tool whoami to identify the current user ans his group membership, then retrieve the output from this command to display it. I know it's not wonderful but this is an example
Dim WshShell, oExec Set WshShell = CreateObject("WScript.Shell")
'The tool is launched Set oExec = WshShell.Exec("Whoami /all")
'We wait for the end of process Do While oExec.Status = 0 WScript.Sleep 100 Loop
'We scan and display the command output flow Do While oExec.StdOut.AtEndOfStream <> True Wscript.Echo oExec.StdOut.ReadLine Loop
Remarks: * does'nt work with shell commands (dir, type etc...) * The stdOut.ReadLine can be replaced with a StdOut.Read(1) to allow reading the stdOut character by character. * The StdOut property does exist too. Not yet tested.