James Hawkins wrote: > > Please don't check env for NULL; RegCloseKey will just fail harmlessly > if env is NULL. We spent a lot of time removing such checks. > OK, I shall re-post my first effort as "Try 3". -- Andy.