473,394 Members | 1,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

SerialPort.Open requiring elevated privs on Vista?

(Apologies if this is not the appropriate group)

I'm trying to use an external USRobotics USB modem (Model 5633B) in
Vista - and talk to it via AT commands from my C# application (using
VS2008 + .Net 2.0). Downloaded the Vista drivers, and it comes up as
COM12. I also have a built-in modem in this laptop (COM3).

I started off using CRT4 (old terminal app like Hyperterm) and can open
and use both the modems, sending AT commands to either without issue.
CRT is run as standard user (and was written well before Vista was
available).

I now try to open COM12 in my app and it's failing at the
SerialPort.Open("COM12") method call saying "The port 'COM12' does not
exist". Doing it with COM3 works.

However, when I accidentally ran my app elevated (elevated VS2008 for
another reason and then forgot) my app could open COM12.

I tried Hyperterm with COM12 and it gives a similar error to my app -
running elevated as Administrator makes it work. I'm not sure how CRT
can open COM12 then, if other apps require elevation to do it.

Can anyone explain what might be causing a specific COM port to require
elevated privs to be opened? I've tried enabling and disabling
Virtualisation for my app, but it makes no difference.

Any thoughts?

Thanks

David
Feb 18 '08 #1
1 1826
David Hearn wrote:
(Apologies if this is not the appropriate group)

I'm trying to use an external USRobotics USB modem (Model 5633B) in
Vista - and talk to it via AT commands from my C# application (using
VS2008 + .Net 2.0). Downloaded the Vista drivers, and it comes up as
COM12. I also have a built-in modem in this laptop (COM3).

I started off using CRT4 (old terminal app like Hyperterm) and can open
and use both the modems, sending AT commands to either without issue.
CRT is run as standard user (and was written well before Vista was
available).

I now try to open COM12 in my app and it's failing at the
SerialPort.Open("COM12") method call saying "The port 'COM12' does not
exist". Doing it with COM3 works.

However, when I accidentally ran my app elevated (elevated VS2008 for
another reason and then forgot) my app could open COM12.

I tried Hyperterm with COM12 and it gives a similar error to my app -
running elevated as Administrator makes it work. I'm not sure how CRT
can open COM12 then, if other apps require elevation to do it.

Can anyone explain what might be causing a specific COM port to require
elevated privs to be opened? I've tried enabling and disabling
Virtualisation for my app, but it makes no difference.

Any thoughts?

Thanks

David
Bizarrely, a reboot sorted it.

D
Feb 18 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Jean Paul Mertens | last post by:
Hello, Someone can tell me why I dont get serial port events in a Service, I created a separate Thread to open the port but no events are coming up (the same happens when I use the timer...
1
by: sranger | last post by:
When I try to use a System.IO.Ports.SerialPort object to read from a serial port, half of the time I have no problems. However, after I successfully read from the serial port, then close the...
0
by: ricolee99 | last post by:
Hi Everyone, I'm using the System.IO.Ports.SerialPort component to attempt to kill an existing component opened by another application. I use the following code: SerialPort serialPort = new...
2
by: Carl Woodward | last post by:
Dear all, Reasonably new to .NET I am confused. Some of the .exe assemblies I am creating using VS2005 are requiring User Account Control confirmation on Vista, but some are not. I am not...
3
by: Adriano | last post by:
Hello, I'm developing an application in VB.NET 2005 that communicates with a device through RS232, and need to send the following sequence of hexadecimal data to the device: 0xFF, 0x01, 0xC3,...
1
by: Lars Siden | last post by:
Hi, I've really struggled with this. Using Hyperterminal everything works fine. But if I write my own program I can't get "OnDataReceived" to be fired. MS samples from the SDK gives me the...
6
by: Keith Lee | last post by:
All: I am attempting to compile the perl module Device::SerialPort and get this error during make -- Manifying blib/man3/Device::SerialPort.3pm Can't open blib/man3/Device::SerialPort.3pm for...
22
by: robertgregson | last post by:
Using C#, .NET3.5, Visual Studio 2008 and WCF on Windows VISTA SP1, I have written a service, service host (as a C# console application) and a client. The service uses...
0
by: cronusf | last post by:
I set up two virtual COM ports 3 and 4 using com0com. I tried to test it with the following program. However, the DataReceived event handlers never get called. Can anyone with SerialPort class...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.