Thanks Mark and Kyder

I think I've just nailed it. It's because as domain user you don't have permissions to write to the HKLM. This script now works because I am writing to HKCU instead.

Also possibly the way I referenced HKCU as per HKEY_CURRENT_USER that it is now working ?

This works:

WriteValue('HKEY_CURRENT_USER\Software\Microsoft\Updates','Waikaremoana','1','REG_DWORD')


This doesn't

WriteValue('HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Updates','Waikaremoana','1','REG_DWORD')


Many thanks to you both for helping me though this

Cheers