$counter=1
$Initials=""
$x = len (@userid)

while $counter =< $x
$Y=substr (ucase(@userid),$counter,1)
$ascii=asc ($y)
$hex=dectohex ($ascii)
$counter=$counter+1
;the spaces are to force at stringcopy.
$Initials=" "+$Initials+$hex+"00"
loop
$Initials=ltrim ($Initials) +"00" +"00"


$counter=1
$Name=""

$x = len (@fullname)

while $counter =< $x
$Y=substr (@fullname,$counter,1)
$ascii=asc ($y)
$hex=dectohex ($ascii)
$counter=$counter+1
$Name=" "+$Name+$hex+"00"
loop
$Name=ltrim ($Name) +"00" +"00"

;Check the keys for the right version of office

Writevalue("HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Common\UserInfo","UserInitials",$Initials,"reg_binary")
Writevalue("HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Common\UserInfo","UserName",$Name,"reg_binary")