OK, I added an environment variable in the system (windows) and…
That fixed it. I thought I was going nuts there for a moment.
I just want to say thanks for your patience in going through this with me - I might have got there in the end but I might also have give up by now.
I will add a comment here Flashing script wrongfully claims the phone is still locked so the next user maybe gets there a bit quicker.
Have a good day !