Mhhh I dont know if you can do it at runtime and do not imagine the reazon, but if what you want is a way to define the port outside the exe, then, define a variable as the port and at startup read it from an ini file, for exaple:
loc:port = getini('gmed','port',88,'.\gmed.ini')
Hope this helps
Alberto