I managed to get ride of that error by upgrading to kix32 ver 4.22 and the script managed to run successuly.
However it didnt map to any drive and got some error

No special handling for group Everyone
No special handling for group Interactive
No special handling for group Authenticated USers
No special handling for group mylocalmachine\Administrators
No special handling for group mylocalmachine\Users
No special handling for group mylocalmachine\Power Users


Can you have a look one more time please maybe I'm missing something. Thank you