Ah, right, I hadn't remembered the parameters correctly.

There may be additional things you can do, to make the batch file wait until the network adapter is connected before trying its trickery. Or perhaps there is a feature in Windows Task Scheduler to fire off the task only when connecting successfully to that specific network.

Strangely, that's what the "/persistent=yes" is supposed to do: Automatically connect under those conditions. Why it's not working on that system... I don't know. So yeah, it's a kludge that works around the fact that a basic level thing on Windows isn't working as you expect.
_________________________
Tony Fabris