EDN Admin
Well-known member
I can do it manually in a couple of clicks, but the whole internet doesnt have the answer on how to do it programmatically. Here is what I do manually:
1. Open Device Manager.
2. Expand Ports.
3. Right-click Communication Port (COM1) and select Properties.
4. In the subsequent dialog click Port Settings tab, then click Advanced.
5. Select COM5 instead of COM1 in the COM Port Number combobox.
6. Click OK.
<br/>
Now I need to do this from my application, and I just couldnt find a way. I can read all the properties of any com port using SerialPort class or even Win32_SerialPort API. But there is just no way to change the com port name...
Please, help me somebody.
View the full article
1. Open Device Manager.
2. Expand Ports.
3. Right-click Communication Port (COM1) and select Properties.
4. In the subsequent dialog click Port Settings tab, then click Advanced.
5. Select COM5 instead of COM1 in the COM Port Number combobox.
6. Click OK.
<br/>
Now I need to do this from my application, and I just couldnt find a way. I can read all the properties of any com port using SerialPort class or even Win32_SerialPort API. But there is just no way to change the com port name...
Please, help me somebody.
View the full article