Four remarks:

Firstly, HKEY_LKOCAL_MACHINE requires administrative privileges to write to under Windows NT/2000/XP.

Secondly, please post your UDF in between [CODE] tags and use the standard UDF formatting (see the other posted UDFs for examples).

Thirdly, suppress all return codes (see Why does the console display zeros and ones (amongst others)? )

Fourthly, you are not returning any kind of success or error code. Normally, one would expect a return code of '0' for a successful call to ADD2PATH, or the appropriate error code.

[ 23 July 2002, 19:49: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.