How to pass a start parameters to Windows Service

Discussion in 'ASP .Net Web Services' started by Eric Chong, Sep 5, 2003.

  1. Eric Chong

    Eric Chong Guest

    I created a Windows Service in C# that requires to get
    passed command arguments like a Console App. I noticed
    that there is an option "Start parameters" text box in
    the property of a Windows Service in MMC. Is there any
    way to get arguments using this option? If possible, what
    framework method should I use to get an arguement?
    Thanks in advance.

    Eric
    Eric Chong, Sep 5, 2003
    #1
    1. Advertising

  2. Hi Eric,

    I think you can use WMI to get this property.
    For more details, I will do some research for you.

    Best regards,
    Jeffrey Tan
    Microsoft Online Partner Support
    Get Secure! - www.microsoft.com/security
    This posting is provided "as is" with no warranties and confers no rights.

    --------------------
    | Content-Class: urn:content-classes:message
    | From: "Eric Chong" <>
    | Sender: "Eric Chong" <>
    | Subject: How to pass a start parameters to Windows Service
    | Date: Fri, 5 Sep 2003 11:12:02 -0700
    | Lines: 9
    | Message-ID: <23aa01c373d9$347ab3e0$>
    | MIME-Version: 1.0
    | Content-Type: text/plain;
    | charset="iso-8859-1"
    | Content-Transfer-Encoding: 7bit
    | X-Newsreader: Microsoft CDO for Windows 2000
    | X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
    | Thread-Index: AcNz2TR6u0M+7LjdQrSdpKUorgvuVg==
    | Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
    | Path: cpmsftngxa06.phx.gbl
    | Xref: cpmsftngxa06.phx.gbl
    microsoft.public.dotnet.framework.aspnet.webservices:19222
    | NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161
    | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
    |
    | I created a Windows Service in C# that requires to get
    | passed command arguments like a Console App. I noticed
    | that there is an option "Start parameters" text box in
    | the property of a Windows Service in MMC. Is there any
    | way to get arguments using this option? If possible, what
    | framework method should I use to get an arguement?
    | Thanks in advance.
    |
    | Eric
    |
    Jeffrey Tan[MSFT], Sep 8, 2003
    #2
    1. Advertising

  3. Hi Eric,

    I found that this post had been posted in several groups.
    A member of our team has replied your question in
    microsoft.public.dotnet.general
    He will follow up you there.
    Thanks for you understanding.

    Best regards,
    Jeffrey Tan
    Microsoft Online Partner Support
    Get Secure! - www.microsoft.com/security
    This posting is provided "as is" with no warranties and confers no rights.

    --------------------
    | Content-Class: urn:content-classes:message
    | From: "Eric Chong" <>
    | Sender: "Eric Chong" <>
    | Subject: How to pass a start parameters to Windows Service
    | Date: Fri, 5 Sep 2003 11:12:02 -0700
    | Lines: 9
    | Message-ID: <23aa01c373d9$347ab3e0$>
    | MIME-Version: 1.0
    | Content-Type: text/plain;
    | charset="iso-8859-1"
    | Content-Transfer-Encoding: 7bit
    | X-Newsreader: Microsoft CDO for Windows 2000
    | X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
    | Thread-Index: AcNz2TR6u0M+7LjdQrSdpKUorgvuVg==
    | Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
    | Path: cpmsftngxa06.phx.gbl
    | Xref: cpmsftngxa06.phx.gbl
    microsoft.public.dotnet.framework.aspnet.webservices:19222
    | NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161
    | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
    |
    | I created a Windows Service in C# that requires to get
    | passed command arguments like a Console App. I noticed
    | that there is an option "Start parameters" text box in
    | the property of a Windows Service in MMC. Is there any
    | way to get arguments using this option? If possible, what
    | framework method should I use to get an arguement?
    | Thanks in advance.
    |
    | Eric
    |
    Jeffrey Tan[MSFT], Sep 9, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?M2Ry?=
    Replies:
    2
    Views:
    10,918
    Steven Cheng[MSFT]
    Sep 7, 2004
  2. Anup
    Replies:
    1
    Views:
    2,766
    Mark Rae
    May 9, 2006
  3. Goran Djuranovic
    Replies:
    3
    Views:
    4,060
    Goran Djuranovic
    Feb 22, 2007
  4. prasathrk
    Replies:
    0
    Views:
    142
    prasathrk
    Nov 27, 2007
  5. Kai Geng
    Replies:
    0
    Views:
    181
    Kai Geng
    Dec 12, 2007
Loading...

Share This Page