windowscmdcacls

Script for locating "Service" locations in Windows


I am trying to write a script in windows command prompt (windows 8), to find out the directory location of services running. For example

net start // gives all the running services. I want to know the location of those services

Help required!


Solution

  • The following command is using PowerShell in order to display what you want:

    powershell.exe -noexit "Get-WmiObject win32_service | select Name, DisplayName, State, PathName"
    

    Just copy and paste it into a "cmd" window.
    It will display you the service name, the display name, the state and the path to the executable.