As a temporal solution, this can work. However, there are more places where this is still a problem. For example, saving a parameter with a user defined string that includes a quotation mark. This is common case in the annotation script when the user wants to draw a label like ' Resolution 1.8 "/px '.
I can program around this, but it should not be necessary since PI escapes quotation marks in the parameters in other places as in the option "Edit Instance Source Code".
It is not urgent and it can wait (nobody has reported this problem yet), however I think that this would be better solved inside PI than in the script. Perhaps, instead writing each parameter in the command line it would be better to simply pass the name of the instance icon:
run -x -icon="Test3" -p="isGlobalTarget,true" -p="isViewTarget,false"
instead of
run -x -p="Param1,{"A B"}" --md5="bbb1d06da3054db95ceb53febb35d3f0" -p="isGlobalTarget,true" -p="isViewTarget,false" "C:/Users/Andres/Documents/PCL/test3.js"