Thanks, that is a big help.

I have still have one problem which relates to the last line of code in my original script posting. By that I mean the script is not inserting a correct value into the registry, how would I represent the hex value shown below?

[HKEY_CURRENT_USER\Software\Microsoft\Internet Connection Wizard]
"Completed"=hex:01,00,00,00"

Am I correct in saying I cannot use 01,00,00,00 because of the commas?