2

I am using Windows XP Professional edition.

As my project requirement i want to update COM1 port default settings to my customized settings.

My Computer -> Manage -> Device Manager -> Ports -> Communications Port -> Port Settings ->

default settings are,

  1. Baud Rate === 9600
  2. databits === 8
  3. parity == none
  4. stop bit == 1

I want to change the above settings to

  1. Baud Rate === 2400
  2. databits === 7
  3. parity == even
  4. stop bit == 2

(what ever i am changing here in code should reflect in device manger ->port settings

Thanks in advance

Mike
  • 47,263
  • 29
  • 113
  • 177
kala
  • 111
  • 2
  • 3
  • 7
  • What does this question have to do with C#? Do you want to change the system defaults for that port? Do you need a C# program that you run once to change the defaults? Or do you want to change the settings in a C# program to only affect that run? – David Schwartz Jul 06 '12 at 10:34
  • I need a C# program to change the system default settings for that port. – kala Jul 07 '12 at 04:53
  • 1
    Problem Solved .The Code is..Microsoft.Win32.RegistryKey myKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Ports", true); myKey.SetValue("COM1:", "2400,n,7,1"); – kala Jul 17 '12 at 04:34
  • can you please see my [question](https://stackoverflow.com/q/64203396/6854117) related to it? – Moeez Oct 05 '20 at 07:00

0 Answers0