Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

3 Answers 3

process explorer should tell you this in the command line view. See the link for details

share|improve this answer
    
It is weird. For some services or applications, "Command Line" column does show parameters but not for the service I am running... –  Sung Apr 27 '10 at 17:08

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 up

Here's a screenshot from the web that shows a parameter of: -sSQL2005 alt text

share|improve this answer
    
That path is read out of the registry and has nothing to do with parameters passed on with net start, which is what the question is about. –  John Gardeniers Apr 28 '10 at 1:03

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.