What exactly are you trying to accomplish that you think dynamically changing publish settings is the solution?
Forum Rules