How do you find out what parameter was passed when starting a Windows service?
I usually start a service thru net start
by passing parameters as shown below
net start DocumentHashService /Recursive /Count:500
services.msc
does not list what parameters a service was started with.
Is there a way to view the parameters passed?
process explorer should tell you this in the command line view. See the link for details
Normally the only reliable way is to modify the service to report or log the parameters. As this is likely not possible you can temporarily replace the service executable with one which does report the parameters. You can grab a very simple executable intended specifically for this task from here. Once you have gathered the information you require replace the executable with the original.
From within services.msc you can open the properties of a service and look for
Path to executable:
which has the entire launch string underneath, including parameters the system uses when firing it upHere's a screenshot from the web that shows a parameter of: -sSQL2005 alt text http://www.sqlstudy.com/stimages/sql-2005-services-en.jpg