I have tried to disable com port by using
Microsoft.Win32.Registry.SetValue(
@"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR",
"Start",
4,
Microsoft.Win32.RegistryValueKind.DWord
);
//enable USB storage...
Microsoft.Win32.Registry.SetValue(
@"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR",
"Start",
3,
Microsoft.Win32.RegistryValueKind.DWord
);
but doesn't work in 64 bit pc.
Is there any other solution to disable com port in 64 bit?