I hope that this script is helpfull for someone.
It was created in a environment where users change their workstation often,
but we want to know which user worked with which Office dokument.

Regards

Dirk

;************************************************************************
; Change Userinfo for MS-Office 2K3 in the Registry to current user
;************************************************************************

$Laenge = len(@fullname)

$zaehler = 1

while $zaehler < $laenge+1

$hexbyte = DecToHex (Asc(Substr(UCase(@fullname),$zaehler,1))) ; great Kung-Fu here

if $hexbyte = "20"
$incount = ($zaehler*4)+1
endif

$hexstr = $hexstr + $hexbyte + "00"

$zaehler = $zaehler + 1

loop

$strout = $hexstr+"0000" ; complete name upcase

$initials = Substr($strout,1,4)+Substr($strout,$incount,8)+"0000" ; 1st Char Firstname, 1st and 2nd Char of Surename

$RC=WriteValue("HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Common\UserInfo", "UserName", $strout, "REG_BINARY")
$RC=WriteValue("HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Common\UserInfo", "UserInitials", $initials, "REG_BINARY")

;*************************************************************************