You are putting the result of the reg key/value check into a variable and the check on @error. Why not check on the variable like this.

Code:

$Outlook = ReadValue("HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsytem\Profiles", "DefaultProfile")
If $outlook = 0
command to generate Outlook Profile
Endif



BTW: HKEY_CURRENT_USER is the same as HKCU. A little code golfing can’t hurt now and then
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.