By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,950 Members | 1,005 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,950 IT Pros & Developers. It's quick & easy.

How to install windows service with passing parameters?

P: 1
I want to pass two parameters at installation time.
I have already coded for same.
I want installation execution line.
Jul 11 '16 #1
Share this Question
Share on Google+
1 Reply


Expert 100+
P: 1,031
Type, on a command prompt,
SC CREATE HELP

On Windows 10 you will see this:
Expand|Select|Wrap|Line Numbers
  1. DESCRIPTION:
  2.         Creates a service entry in the registry and Service Database.
  3. USAGE:
  4.         sc <server> create [service name] [binPath= ] <option1> <option2>...
  5.  
  6. OPTIONS:
  7. NOTE: The option name includes the equal sign.
  8.       A space is required between the equal sign and the value.
  9.  type= <own|share|interact|kernel|filesys|rec|userown|usershare>
  10.        (default = own)
  11.  start= <boot|system|auto|demand|disabled|delayed-auto>
  12.        (default = demand)
  13.  error= <normal|severe|critical|ignore>
  14.        (default = normal)
  15.  binPath= <BinaryPathName to the .exe file>
  16.  group= <LoadOrderGroup>
  17.  tag= <yes|no>
  18.  depend= <Dependencies(separated by / (forward slash))>
  19.  obj= <AccountName|ObjectName>
  20.        (default = LocalSystem)
  21.  DisplayName= <display name>
  22.  password= <password>
  23.  
Dec 17 '16 #2

Post your reply

Sign in to post your reply or Sign up for a free account.