The [code tags] create a window in the post to view the code. Text outside the window can be formatted.

Q: How does the logon script report Group Policies applied ?
A: The following code lists GPO names (REG_SZ), but does not interpret the date/time field (REG_DWORD, variable $poltime) - Suggestions ??
;
; Registry locations for GPO applied to WinXP (Current User)
; Loop1
; Enumerate gpextensions to capture [sid]
; hkcu\software\microsoft\windows nt\currentversion\winlogon\gpextensions\[sid]\LastpolicyTime (Reg_Dword)
; Loop2
; Enumerate SID to capture display name
; hkcu\software\microsoft\windows\currentversion\group policy\history\[sid]\0\DisplayName (String)
; hkcu\software\microsoft\windows\currentversion\group policy\history\[sid]\1\DisplayName (String)
; hkcu\software\microsoft\windows\currentversion\group policy\history\[sid]\2\DisplayName (String)

 Code:
dim $usersid, $userdname, $keyname, $index1, $index2, $msg, $err
dim $poltime, $sidname, $dname
$usersid="hkcu\software\microsoft\windows nt\currentversion\winlogon\gpextensions"
$userdname="hkcu\software\microsoft\windows\currentversion\group policy\history"

:loop1
$keyname=enumkey("$usersid",$index1)
if @error=0
  $poltime=readvalue("$usersid\$keyname","LastPolicyTime")
  $msg="User sid ($keyname)"
  ? "@DATE,@TIME,$msg"
  :loop2
  $sidname=enumkey("$userdname\$keyname",$index2)
  if @ERROR=0
    $dname=readvalue("$userdname\$keyname\$sidname","DisplayName")
    $msg="User policy ($dname) was applied ($poltime)"
    ? "@DATE,@TIME,$msg"
    goto loop2
  endif
  goto loop1
endif
_________________________
gdstiers@tva.gov