You can programmatically configure the COM port settings using the viSetAttribute function. Documentation on this function and the Attributes available to you can be found in the VISA manuals located at:
http://digital.ni.com/manuals.nsf/web%2Fbyproductcurrent?OpenView&Start=1&Count=500&Expand=6.16#6.16