Jump to content

Recommended Posts

Posted

I'm writing a Windows Service for reading data from COM port under WinXP. The service requires startup parameters.

 

I have no problem reading the parameters from Environment.GetCommandLineArgs(). However when I type the parameters at the "Service" MMC panel, the value is lost whenever I press "OK" to close it.

 

I've tried to set it to "manual" then "automatic" again just to make the "Apply" button enabled. But it also doesn't keep the value when "Apply" is pressed.

 

I've tried Close the service, set the parameters, then Start it again. The parameters doesn't pass to the service when it starts... and lost when "OK" is pressed.

 

It seems to me the "startup parameters" box is not connected to anything... is it a bug or it is to be used with some fancy special way?

 

Meanwhile I just go to HKLM\SYSTEM\ControlSet001\Services\\ImagePath and append the parameters there, but ask the user to change COM port setting doesn't sound good to me. I wish it could be done using a more standard way - using the MMC Service panel.

 

 

 

More...

 

View All Our Microsoft Related Feeds

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...