I need to create a .bat file that will set a wireless connection, eg MyNetworkName, to a public network, so it won't be on Home or Work.
I have searched and I don't know how to do this.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.
Note this is not a definitive solution, but something that might get you or others well underway.
Whether or not a network is public is stored in the registry, which can be edited through batch files. For a static edit, the easiest method would be to prepare a .reg-file, then merging it with the registry using the regedit command, e.g.
One of the keys involved in telling a home network from a public one, is
Unfortunately, but not surprisingly, these values are not the only ones set by the Network Center when a connection type is changed to public and as it stands, the .reg-file is insufficient; other keys would need to be added to the list.