The following scriopt is not updating the required field, how can I find out that the $MProfile is collecting the correct information?

Taking it that it has already, why won't the command work?

$MsgKey = "$HKCUSMWNTCV\Windows Messaging Subsystem\Profiles"
$MProfile = ReadValue($MsgKey, "DefaultProfile") ;Read the current default profile

WRITEVALUE("HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging

Subsystem\Profiles\$MProfile\13dbbc0c8aa05101a9bb000aa002fc45a","00036606","00620000","REG_BINARY")

Thanks in Advance